Vehicle Detection & Tracking - Self-Driving Car NanoDegree

Dean Webb - Vehicle Detection & Tracking Pipeline

Self-Driving Car Engineer Nanodegee - Project 5

In this project, my goal is to write a software pipeline to extract features from a Dataset and identify the lane boundaries within an input video. In this project, my ultimate goal was to write a software pipeline that allows for minimal tuning of hyperparameters (e.g. a linear combination of various scaled windows) and automatically extract bounding boxes from the images. The implementation would ideally detect vehicles in a video (e.g. the test_video.mp4 and the full project_video.mp4).

To satify the project requirements, I implemented tracking using combination of 1) Sliding Windows, 2) Hog sub-sampling, 3) False-positive filtering, and 4) Re-using found vehicles (See e.g., code cells containing functions single_img_features, draw_single_frame_labeled_bboxes, and draw_multi_frame_labeled_bboxes in iPython notebook vehicle-detection-setup.ipynb)

Fortunately, I was also able to install and configure the YOLO library ("You only look once") To detect vehicles! It is not optimized yet (I'm currently processing the frames by loading the weights for each frame one at a time, but it was a helpful project for learning. The project goals are listed in detail below.


alt text


Project Goals

The goals / steps of this project are the following:

  • Perform a Histogram of Oriented Gradients (HOG) feature extraction on a labeled training set of images and train a classifier Linear SVM classifier
  • Optionally, you can also apply a color transform and append binned color features, as well as histograms of color, to your HOG feature vector.
  • Note: for those first two steps don't forget to normalize your features and randomize a selection for training and testing.
  • Implement a sliding-window technique and use your trained classifier to search for vehicles in images.
  • Run your pipeline on a video stream (start with the test_video.mp4 and later implement on full project_video.mp4) and create a heat map of recurring detections frame by frame to reject outliers and follow detected vehicles.
  • Estimate a bounding box for vehicles detected.

Dependencies

Here are links to the labeled data for vehicle and non-vehicle examples to train your classifier. These example images come from a combination of the GTI vehicle image database, the KITTI vision benchmark suite, and examples extracted from the project video itself. You are welcome and encouraged to take advantage of the recently released Udacity labeled dataset to augment your training data.

Some example images for testing your pipeline on single frames are located in the test_images folder. To help the reviewer examine your work, please save examples of the output from each stage of your pipeline in the folder called ouput_images, and include them in your writeup for the project by describing what each image shows. The video called project_video.mp4 is the video your pipeline should work well on.


Rubric Points

Here I will consider the rubric points individually and describe how I addressed each point in my implementation below.


Writeup / README

1. Provide a Writeup / README that includes all the rubric points and how you addressed each one. You can submit your writeup as markdown or pdf.

Done! - See below.

Histogram of Oriented Gradients (HOG)

1. Explain how (and identify where in your code) you extracted HOG features from the training images.

The code for this step is contained in at least code cell 12 of the accompanying IPython notebook.

I started by reading in all the vehicle and non-vehicle images. Optionally, I include a flag that augments the given dataset with the open-sourced Udacity dataset (labeled from CrowdAI). To accomplish this, the pipeline downloads and extracts images from the source site, then uses the labeled bounding boxes to extract out the car images, separated by the data set.

It then also takes a snapshot above or to the bottom-left of the car image to balanace out the dataset with a non-car image. Here is an example of one of each of the vehicle and non-vehicle classes:

Project Set Car Project Set NonCar Udacity Set Car Udacity Set Non-Car

I then explored different color spaces and different skimage.hog() parameters (orientations, pixels_per_cell, and cells_per_block). I grabbed random images from each of the two classes and displayed them to get a feel for what the skimage.hog() output looks like.

Here is an example using the YCrCb color space and HOG parameters of orientations=9, pixels_per_cell=(8, 8), and cells_per_block=(2, 2):

Project Set HOG Features

Below is a similar set of examples, but with the Udacity Dataset used for image augmentation.

Udacity Set HOG Features

2. Explain how you settled on your final choice of HOG parameters.

I tried various combinations of parameters and feature extraction techniques. Intiailly, I tried to stack the color_histogram, spatial_binning, and all channels of the hog technique in a feature vecture but I found the spatial_binning features made very many false positives when I processed the video.

I also experimented with smoothing and with many different scaling parameters, with the goal in mind to feed in as many windows as possible, then let my Vehicle class filter through the false positives. This ended up working pretty well, but there were too many false positives still. On the bad side, it took way too long to process.

As it turns out there was a bug (it always does it seems) in my feature extraction algorithm, I realized I was converting my images to YCrCb when predicting, but I forgot to do the converting before feeding my classifier. Once I fixed the color space conversion issue, the false positives went away. In fact, it seemed to work well enough without the spatial_binning features, which I removed during my attempts to debug the false positives. In this regard, I utilize the color_histogram features after converting to HSV, and use the hog features with a) 9 orientations, b) 8 Pixels per cell, and c) 2 cells per block. The hog orientations works pretty well with more than 6, but I found 9 to work the best.

Additionally, I used scaling parameters to resize the images before running through the classifier. Below is an example the scaling parameters I used:

## Parameters - HOG Sub-Sampling ##
SW_YSTART = 400
SW_YSTOP = 656
SW_SCALES = [1.0, 1.5, 1.75]
SW_CONVERT_COLOR = 'RGB2YCrCb'

3. Describe how (and identify where in your code) you trained a classifier using your selected HOG features (and color features if you used them).

I trained a linear SVM using the features listed above. Here's an example of the output in the attached iPython Notebook of the SVM classifier results. (98.85%)

SVM Classifier Code Snippet

One issue that I noticed is that the classifier appears to decrease I a little the more data from the Udacity set that I add. I believe this is normal behavior since I can't be sure that my non-car features did not have some car images accidentally added in (since I added all images automatically).


1. Describe how (and identify where in your code) you implemented a sliding window search. How did you decide what scales to search and how much to overlap windows?

I decided to search random window positions at random scales all over the image. As I noted above, this experiment came with mixed results due to my earlier noted bug. Although I used HOG subsampling, I also included the sliding windows technique in my final algorithm sort of as a redundancy. Below are some parameters passed into my sliding_windows:

## Sliding Windows Parameters ##
SW_XSTART_STOPS = [(200, None), (256, 1000)]
SW_YSTART_STOPS = [(384, 640), (384, None)]
SW_XY_WINDOWS = [(96,96),(128,128)]
SW_XY_OVERLAPS = [(.450,.480),(.21,.280)]

Here's the sliding_windows helper functions I used to take in a list of scaling parameters:

Sliding Windows Code Snippet

I then used a search_windows helper function to loop through and check if the given windows contained a car image:

Search Windows Code Snippet

2. Show some examples of test images to demonstrate how your pipeline is working. What did you do to optimize the performance of your classifier?

As mentioned above, I implemented a combination of 1) Sliding Windows, 2) Hog sub-sampling, 3) False-positive filtering, and 4) Re-using found vehicles (See e.g., code cells containing functions single_img_features, draw_single_frame_labeled_bboxes, and draw_multi_frame_labeled_bboxes in iPython notebook vehicle-detection-setup.ipynb). I searched on multiple scales using a conversion to YCrCb (and all 3-channels of HOG features plus color histograms in the HSV colorspace) The combination of these techniques are then wrapped in a flag to turn them on and off, which provided a nice way of testing their influence to the final bounding boxes. Here's a code snippet of the pipeline processing a video frame being:

Video Pipeline Code Snippet

Here are some example images that were output (in this case from the function draw_single_frame_labeled_bboxes):

Single Frame Example Images

Video Implementation

Here's a link to my video result. Here's the video embdedded:

2. Describe how (and identify where in your code) you implemented some kind of filter for false positives and some method for combining overlapping bounding boxes.

I recorded the positions of positive detections in each frame of the video. From the positive detections I created a heatmap and then thresholded that map to identify vehicle positions. I then used scipy.ndimage.measurements.label() to identify individual blobs in the heatmap. Since I ultimately decided to apply multiple techniques at the same time, I created a list of labels from each respective technique, then merged the results together. I then assumed each remaining blob in the heatmap corresponded to a detected vehicle, so I constructed bounding boxes to cover the area of each blob detected.

Here's an example result showing the heatmap from a series of frames of video, the result of scipy.ndimage.measurements.label() and the bounding boxes then overlaid on the last frame of video. Here are example frames and their corresponding heatmaps:

Heatmap and Labels Examples

Note that the the resulting bounding boxes are drawn onto the last frame in the series.


Discussion / Learnings / Shortcomings

1. Briefly discuss any problems / issues you faced in your implementation of this project. Where will your pipeline likely fail? What could you do to make it more robust?

Here I'll talk about the approach I took, what techniques I used, what worked and why, where the pipeline might fail and how I might improve it if I were going to pursue this project further.

At first, due to errors in my implementation, I had much trouble getting the SVM classifer to predict much of anything correctly. This I found out much later was because I forgot to convert the image to 'YCrCb' before extrracting the hog features, although I performed the conversion right before prediction.

As a way to increase the accuracy (and decrease false positives), I include a flag that augments the given dataset with the open-sourced Udacity dataset (labeled from CrowdAI). To accomplish this, the pipeline downloads and extracts images from the source site, then uses the labeled bounding boxes to extract out the car images, separated by the data set. Some code snippets are printed below:

Udacity Dataset Augmentation

As noted above, my combination of 1) Sliding Windows, 2) Hog sub-sampling, 3) False-positive filtering, and 4) Re-using found vehicles (See e.g., the code cells containing functions single_img_features, draw_single_frame_labeled_bboxes, and draw_multi_frame_labeled_bboxes in iPython notebook vehicle-detection-setup.ipynb) seems to work pretty well.

For extra practice and added redundancy, I also implemented YOLO to investigate/compare how well this network processed the images compared to my original algorithm.


Learnings

For the HOG-subsampling and sliding windows techniques, I used a somewhat limited region to search, this was to limit the false positives from the trees or the roads. Additionally, I tried to combat false positives with an image augmentation approach that utilizes the Udacity dataset. I did this by creating a bounding box to the lower left (to mimic roads) or directly above (to mimic skies) the ground truth labels.

Here's some example images that shows how much of a disaster the prediction windows were at first:

Sliding Windows False Postives

Shortcomings

The biggest issue I noticed was the bounding box not always bounding the entire car image within a box. I believe this is due to the smaller windows in my implementation tending to pick up the image first. I implement a matching schemed on the boxes, which causes the b=size of the box to gradually rise. Along those lines, the boxes disappear once the car starts to disappear fromt he frame. To fix the latter issue, I could augment my dataset with more pictures of car images that are halved or warped by some other means.

I could have spent another few weeks on this project perfecting it. One optimization I had considered was to completely train the YOLO network on my augmented Udacity dataset (discussed above). This I believe will help with YOLO dropping its detection from time to time. Below is a code snippet on how I processed the frames with YOLO:

YOLO Code Snippet

I ran out of time, but my next experiment was going to be to hopefully use the bounding boxes predicted from YOLO as it's own feature extractor somehow to make the image detection more robust and less error prone. My thinking here is I could extract out the bounding boxes using the bounding box color as a pixel value to search for. Once I extracted the boxes, I could integrate them with my Vehicle() class for storing and reusing.

Load Dataset and Preproceses Images

Imports

In [2]:
%matplotlib inline
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import cv2
import glob
from PIL import Image
import time
import os
import zipfile as zf
import tarfile
import csv
import pickle
import urllib
from skimage.feature import hog
from sklearn.svm import LinearSVC
from sklearn.preprocessing import RobustScaler
from sklearn.model_selection import train_test_split
import pandas as pd

Constants

In [12]:
## Dataset Parameters ##
TRAINING_DATASET_DIRECTORY = 'training_set/'
PIPELINE_SETUP_DIRECTORY = 'pipeline_setup_images/'
WORKING_DIRECTORY = 'data/'
NON_VEHICLES_TOKEN = 'non-vehicles'
dataset_path = "{}{}{}{}".format(WORKING_DIRECTORY, TRAINING_DATASET_DIRECTORY,'**/', '*.png')
DATACACHE_DIRECTORY = os.path.join(WORKING_DIRECTORY, 'datacache/')
PROJECT_SOURCE_URL = 'https://s3.amazonaws.com/udacity-sdc/Vehicle_Tracking'
VEHICLES_ZIPFILE = 'vehicles.zip'
NONVEHICLES_ZIPFILE = 'non-vehicles.zip'


## Udacity Dataset Extraction Parameters ##
LABELS_CSV = 'data/object-detection-crowdai/labels.csv'
UDACITY_SOURCE_URL = 'http://bit.ly/udacity-annoations-crowdai'
DATASET_ZIPFILE = 'object-detection-crowdai.tar.gz'
UDACITY_DATASET_DIRECTORY = 'udacity-set'
APPEND_UDACITY_DATASET = False
UDACITY_AUGMENT_PCT = 0.015

## Image Processing ##
DEFAULT_LENGTH, DEFAULT_WIDTH, DEFAULT_DEPTH = (64, 64, 3)
if DEFAULT_DEPTH > 1:
    DEFAULT_RESOLUTION = (DEFAULT_LENGTH, DEFAULT_WIDTH, DEFAULT_DEPTH)
else:
    DEFAULT_RESOLUTION = (DEFAULT_LENGTH, DEFAULT_WIDTH)

## Feature Extraction Parameters ##
# Spatial Binning
SPATIAL = 64
BIN_SPATIAL_SIZE = (SPATIAL, SPATIAL)
# Color Histogram
HIST_NBINS = 128
COLOR_SPACE = 'HSV'
# HOG Parameters
HOG_ORIENTATIONS = 9
HOG_PIXELS_PER_CELL = 8
HOG_CELLS_PER_BLOCK = 2
HOG_CHANNEL = 'ALL' # Can be 0, 1, 2, or "ALL"
SW_SPATIAL_FEAT_FLAG = False
SW_HOG_FEAT_FLAG = True
SW_COLOR_HIST_FEAT_FLAG = True

## Training Parameters ##
# SVC Parameters
VALIDATION_PORTION = .2
N_PREDICTIONS = 100
OVERWRITE_DATACACHE = True

Helper Functions - Udacity Dataset Loading & Augmentation

In [11]:
# Define a function to scale .PNG and JPEG Files both to 0 to 1 
def normalize_pixels(img):
    max_pixel_value = np.max(img)
    if max_pixel_value > 1.0:
        img = np.copy(np.multiply(img, 1.0 / 255.0)).astype(np.float64)
    return img

# Define a function to scale .PNG and JPEG Files both to 0 to 1 
def denormalize_pixels(img):
    max_pixel_value = np.max(img)
    if max_pixel_value <= 1.0:
        img = np.copy(np.multiply(img, 255.0)).astype(np.float64)
    return img

def process_img(filepath):
    image = cv2.imread(filepath)
    image = cv2.cvtColor(image,cv2.COLOR_BGR2RGB)
    image = image/255.-.5
    return image
In [5]:
def maybe_download(source_url, filename):
    if not os.path.exists(WORKING_DIRECTORY):
        os.mkdir(WORKING_DIRECTORY)
    
    filepath = os.path.join(WORKING_DIRECTORY, filename)
    if not os.path.exists(filepath):
        filepath, _ = urllib.request.urlretrieve(source_url, filepath)
        statinfo = os.stat(filepath)
        print('')
        print('Succesfully downloaded:', filepath, '| % d MB.' % int(statinfo.st_size*1e-6))
    return filepath
In [6]:
def unzip_file(zip_file, source_dir_name=None, destination=WORKING_DIRECTORY):
    if 'tar.gz' in zip_file:
        head, tail = os.path.splitext(zip_file)
        if not os.path.exists(os.path.join(os.path.splitext(head)[0])):
            print('unzipping file:', zip_file, 'to directory:', os.path.join( os.path.splitext(head)[0]))
            tar = tarfile.open(zip_file, "r:*")
            tar.extractall(destination)
            tar.close()
    else: #.zip extension
        head, tail = os.path.splitext(zip_file)
        #print('Target Dir', os.path.join(destination, head))
        if not os.path.exists(os.path.join(destination, head)):
            print('File does not exist: ', os.path.join(destination, head), ': Extracting')
            zipf = zf.ZipFile(os.path.join(WORKING_DIRECTORY,zip_file))
            print('Loaded zipf',zipf, ': Extracting')
            zipf.extractall(os.path.join(destination, head))
            zipf.close()
In [13]:
vehicles_zipfile = maybe_download(os.path.join(PROJECT_SOURCE_URL,VEHICLES_ZIPFILE), VEHICLES_ZIPFILE)
source_dir_name, fname = os.path.split(vehicles_zipfile)
unzip_file(fname, source_dir_name=source_dir_name, destination=os.path.join(WORKING_DIRECTORY, TRAINING_DATASET_DIRECTORY))

non_vehicles_zipfile = maybe_download(os.path.join(PROJECT_SOURCE_URL,NONVEHICLES_ZIPFILE), NONVEHICLES_ZIPFILE)
source_dir_name, fname = os.path.split(non_vehicles_zipfile)
unzip_file(fname, source_dir_name=source_dir_name, destination=os.path.join(WORKING_DIRECTORY, TRAINING_DATASET_DIRECTORY))

## Udacity Dataset
tar_file = maybe_download(UDACITY_SOURCE_URL, DATASET_ZIPFILE)
unzip_file(tar_file)

cars_dir = os.path.join(WORKING_DIRECTORY, TRAINING_DATASET_DIRECTORY, 
                         'vehicles', UDACITY_DATASET_DIRECTORY)
os.makedirs(cars_dir, exist_ok=True)
noncars_dir = os.path.join(WORKING_DIRECTORY, TRAINING_DATASET_DIRECTORY, 
                         'non-vehicles', UDACITY_DATASET_DIRECTORY)
os.makedirs(os.path.join(noncars_dir, 'skies'), exist_ok=True)
os.makedirs(os.path.join(noncars_dir, 'roads'), exist_ok=True)
In [14]:
## Extract Labels ##
HEADER_ROW=['xstart', 'ystart', 'xstop', 'ystop', 'frame', 'label', 'preview_url']
annotations = pd.read_csv(LABELS_CSV, names=HEADER_ROW, skiprows=1)
annotations.head()
Out[14]:
xstart ystart xstop ystop frame label preview_url
0 785 533 905 644 1479498371963069978.jpg Car http://crowdai.com/images/Wwj-gorOCisE7uxA/vis...
1 89 551 291 680 1479498371963069978.jpg Car http://crowdai.com/images/Wwj-gorOCisE7uxA/vis...
2 268 546 383 650 1479498371963069978.jpg Car http://crowdai.com/images/Wwj-gorOCisE7uxA/vis...
3 455 522 548 615 1479498371963069978.jpg Truck http://crowdai.com/images/Wwj-gorOCisE7uxA/vis...
4 548 522 625 605 1479498371963069978.jpg Truck http://crowdai.com/images/Wwj-gorOCisE7uxA/vis...
In [15]:
def extract_and_preprocess_image(filepath, cars_dir, noncars_dir, xstart, ystart, xstop, ystop,
                                 img_size=(DEFAULT_LENGTH, DEFAULT_WIDTH), img_ext = '.png'):
    full_path = os.path.join(WORKING_DIRECTORY, 'object-detection-crowdai', filepath)
    # Image read in from cv2 + .jpg -> (0 to 1)
    if os.path.exists(full_path) or OVERWRITE_UDACITY_DATASET == True:
        # Use cv2 to open image and extract bounding boxes
        img = process_img(full_path)
        # boxed_img = im[y:y+h,x:x+w]
        # Extract Car Image. Note: numpy arrays are (row, col)!
        
        car_img = img[ystart:ystop, xstart:xstop]
        resized_car_img = cv2.resize(car_img, img_size, interpolation=cv2.INTER_AREA)
        im = Image.fromarray(resized_car_img)
        # Save Car Image to corresponding Directory
        filename, ext = os.path.splitext(filepath)
        new_filename =  "{}_{}_{}_{}_{}_{}{}".format(filename,'car', xstart, ystart, xstop, ystop, img_ext)
        im.save(os.path.join(cars_dir, new_filename)) # Save as .png
        im.close
        
        # Auto-Generate a 'Non-Car' Image to keep dataset balanced
        i_lrc = np.random.randint(3) # 66% chance of auto generating non-car features
        if (i_lrc == 0):
            xstart_mod, ystart_mod, xstop_mod, ystop_mod = xstart, \
                                                    (0 if ystart-(ystop-ystart) < 0 else ystart-(ystop-ystart)), xstop, ystart
            new_filename =  "{}_{}_{}_{}_{}_{}{}".format(filename,'sky', xstart_mod, ystart_mod, xstop_mod, ystop_mod, img_ext)
            path_file = os.path.join(noncars_dir,'skies', new_filename)
        elif (i_lrc == 1):
            xstart_mod, ystart_mod, xstop_mod, ystop_mod = xstart, ystop, xstop, \
                                                    (img_shape[0] if ystop+(ystop-ystart) > img_shape[0] else ystop+(ystop-ystart))
            new_filename =  "{}_{}_{}_{}_{}_{}{}".format(filename,'road', xstart_mod, ystart_mod, xstop_mod, ystop_mod, img_ext)
            path_file = os.path.join(noncars_dir, 'roads', new_filename)
            
        noncar_img = scaled_img[ystart_mod:ystop_mod, xstart_mod:xstop_mod]
        resized_noncar_img = cv2.resize(noncar_img, img_size, interpolation=cv2.INTER_AREA)
        # Save noncar image to corresponding Directory
        im = Image.fromarray(resized_noncar_img)
        filename, ext = os.path.splitext(filepath)
        im.save(path_file) # Save as .png
        im.close

Extract Features from Dataset

In [16]:
## Extract Labels ##      
for label in annotations.as_matrix():
    filename, ext = os.path.splitext(label[4])
    new_filename =  "{}_{}_{}_{}_{}_{}{}".format(filename,'car', label[0], label[1], label[2], label[3], '.png')
    if not os.path.exists(os.path.join(cars_dir, new_filename)) and label[5].lower() == 'car':
        try:
            extract_and_preprocess_image(label[4], cars_dir, noncars_dir, xstart=label[0], ystart=label[1],
                                     xstop=label[2], ystop=label[3])
        except:
            print("Error extracting label:", label, " Moving on..")
Error extracting label: [912 0 951 0 '1479498564477313399.jpg' 'Car'
 'http://crowdai.com/images/k-zz9yqpJIit7OuX/visualize']  Moving on..
Error extracting label: [705 0 732 0 '1479498820473341507.jpg' 'Car'
 'http://crowdai.com/images/Ng_nd_wBlqkgNDGb/visualize']  Moving on..
Error extracting label: [721 0 751 0 '1479499937073018706.jpg' 'Car'
 'http://crowdai.com/images/sbjD-93YWUi9hJ0c/visualize']  Moving on..

Extract Features from Dataset - Helper Functions

Define a function to compute spatial binned pixel intensity features:

In [17]:
def bin_spatial(img, size=BIN_SPATIAL_SIZE):
    color1 = cv2.resize(img[:,:,0], size).ravel()
    color2 = cv2.resize(img[:,:,1], size).ravel()
    color3 = cv2.resize(img[:,:,2], size).ravel()
    return np.hstack((color1, color2, color3)) 

Define a function to compute color histogram features:

In [18]:
# Define a function to compute color histogram features  
def color_hist(img, nbins=HIST_NBINS):
    # Compute the histogram of the color channels separately
    channel1_hist = np.histogram(img[:,:,0], bins=nbins)
    channel2_hist = np.histogram(img[:,:,1], bins=nbins)
    channel3_hist = np.histogram(img[:,:,2], bins=nbins)
    # Concatenate the histograms into a single feature vector
    hist_features = np.concatenate((channel1_hist[0], channel2_hist[0], channel3_hist[0]))
    return hist_features

Define a function to compute hog features:

In [45]:
# Define a function to return HOG features and visualization --
def get_hog_features(img_chan, orient=HOG_ORIENTATIONS,
                     pix_per_cell=HOG_PIXELS_PER_CELL,
                     cell_per_block=HOG_CELLS_PER_BLOCK, 
                     vis=False, feature_vec=True):
    if vis == True:
        features, hog_image = hog(img_chan, orientations=orient, pixels_per_cell=(pix_per_cell, pix_per_cell),
                                  cells_per_block=(cell_per_block, cell_per_block), transform_sqrt=False, 
                                  visualise=vis, feature_vector=feature_vec)
        return features, hog_image
    else:      
        features = hog(img_chan, orientations=orient, pixels_per_cell=(pix_per_cell, pix_per_cell),
                       cells_per_block=(cell_per_block, cell_per_block), transform_sqrt=False, 
                       visualise=vis, feature_vector=feature_vec)
        return features

Download and Preprocess Udacity Dataset

In [46]:
# Define a function to extract features from a list of images
def extract_features(imgs, cspace=COLOR_SPACE, spatial_size=BIN_SPATIAL_SIZE,
                        hist_bins=HIST_NBINS):
    # Create a list to append feature vectors
    features = []
    for file in imgs:       
        image = mpimg.imread(file)
        
        # Image read in from cv2 + .png -> (0 to 1) scaled
        if cspace != 'RGB':
            if cspace == 'HSV':
                feature_image = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)
            elif cspace == 'LUV':
                feature_image = cv2.cvtColor(image, cv2.COLOR_RGB2LUV)
            elif cspace == 'HLS':
                feature_image = cv2.cvtColor(image, cv2.COLOR_RGB2HLS)
            elif cspace == 'YUV':
                feature_image = cv2.cvtColor(image, cv2.COLOR_RGB2YUV)
            elif cspace == 'YCrCb':
                feature_image = cv2.cvtColor(image, cv2.COLOR_RGB2YCrCb)
        else: feature_image = np.copy(image)
        
        # Apply bin_spatial() to get spatial color features
        spatial_features = bin_spatial(feature_image, size=spatial_size)
        
        # Apply color_hist() also with a color space option now
        hist_features = color_hist(feature_image, nbins=hist_bins)
        
        # Call get_hog_features() with vis=False, feature_vec=True
        hog_image = np.copy(cv2.cvtColor(image, cv2.COLOR_RGB2YCrCb))
        
        hog_shape = np.asarray(hog_image.shape)
        if HOG_CHANNEL == 'ALL':
            hog_features = []
            for channel in range(len(hog_shape)):
                hog_features.append(get_hog_features(hog_image[:,:,channel]))
            hog_features = np.ravel(hog_features)        
        else:
            hog_features = get_hog_features(hog_image[:,:,HOG_CHANNEL])
        
        # Append the new feature vector to the features list
        # Allow for flagged setting of feature vectors (spatial, hist, hog) must maintain the ordering
        if(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == True):
            features.append(np.concatenate((spatial_features, hist_features, hog_features)))
        elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == True):
            features.append(np.concatenate((hist_features, hog_features)))
        elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == True):
            features.append(np.array(hog_features))
        elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == True):
            features.append(np.concatenate((spatial_features, hog_features)))
        elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == False):
            features.append(np.array(spatial_features))
        elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == False):
            features.append(np.concatenate((spatial_features, hist_features)))
        elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == False):
            features.append(np.array(hist_features))
        else:
            features.append(np.concatenate(feature_image))
        
    # Return list of feature vectors
    return features

Begin Training Pipeline

In [15]:
## Starting Training Pipeline ##
# Load Image Paths 
images = glob.glob(dataset_path, recursive=True)
cars = []
notcars = []
udacity_cars = []
udacity_notcars = []
for image in images:
    if UDACITY_DATASET_DIRECTORY in image:
        if NON_VEHICLES_TOKEN in image:
            udacity_notcars.append(image)
        else:
            udacity_cars.append(image)
    else:
        if NON_VEHICLES_TOKEN in image:
            notcars.append(image)
        else:
            cars.append(image)

assert len(images) == len(cars) + len(notcars) + len(udacity_cars) + len(udacity_notcars), 'The subarrays have not split the dataset correctly.'
print('Number of Vehicle Images Found:',len(cars))
print('Number of Non-Vehicle Images Found:',len(notcars))
    
if APPEND_UDACITY_DATASET == True: #Using to Keep Dataset separate
    udacity_augment_size = np.int(len(udacity_cars)*UDACITY_AUGMENT_PCT)
    udacity_cars, udacity_notcars = np.array(udacity_cars), np.array(udacity_notcars)
    
    ind = np.random.random_integers(0, len(udacity_cars)-1, udacity_augment_size)
    cars.extend(list(udacity_cars[ind]))
    ind = np.random.random_integers(0, len(udacity_notcars)-1, udacity_augment_size)
    notcars.extend(list(udacity_notcars[ind]))
else:
    num_udacity_features = np.int(len(udacity_cars)*UDACITY_AUGMENT_PCT)
    udacity_cars, udacity_notcars = np.array(udacity_cars), np.array(udacity_notcars)
    
    udacity_features_ind = np.random.randint(0, len(udacity_cars), size=num_udacity_features)
    udacity_cars = list(udacity_cars[udacity_features_ind])
    udacity_features_ind = np.random.randint(0, len(udacity_notcars), size=num_udacity_features)
    udacity_notcars = list(udacity_notcars[udacity_features_ind])
    
    
print('Number of Udacity Vehicle Images Found:',len(udacity_cars))
print('Number of Udacity Non-Vehicle Images Found:',len(udacity_notcars))
print('')
print('Size of Vehicle Images Dataset:',len(cars))
print('Size of Non-Vehicle Images Dataset:',len(notcars))
Number of Vehicle Images Found: 8808
Number of Non-Vehicle Images Found: 8991
Number of Udacity Vehicle Images Found: 942
Number of Udacity Non-Vehicle Images Found: 942

Size of Vehicle Images Dataset: 8808
Size of Non-Vehicle Images Dataset: 8991
In [47]:
# Start Pipeline - Combine and Normalilze Features
car_features = extract_features(cars)
notcar_features = extract_features(notcars)

# Seperately Extract Feature from Udacity Dataset
if APPEND_UDACITY_DATASET == False:
    udacity_car_features = extract_features(udacity_cars)
    udacity_notcar_features = extract_features(udacity_notcars)
    
In [58]:
# Create an array stack of feature vectors
X = np.vstack((np.array(car_features), np.array(notcar_features))).astype(np.float64)

# Fit a per-column scaler
X_scaler = RobustScaler().fit(X)

# Apply the scaler to X
scaled_X = X_scaler.transform(X)
car_ind = np.random.randint(0, len(cars))

# Plot an example of raw and scaled features
fig, ((ax0, ax1, ax2),(ax3, ax4, ax5)) = plt.subplots(2, 3, figsize=(24, 12))
fig.tight_layout()

# Fill in plots of example raw and scaled features
ax0.imshow(mpimg.imread(cars[car_ind]))
ax0.set_title('Cars - Project Set')
ax1.plot(X[car_ind])
ax1.set_title('Cars Raw Features')
ax2.plot(scaled_X[car_ind])
ax2.set_title('Cars Normalized Features')

ax3.imshow(mpimg.imread(notcars[-1]))
ax3.set_title('Not-Cars Project Set')
ax4.plot(X[-1])
ax4.set_title('Not-Cars Raw Features')
ax5.plot(scaled_X[-1])
ax5.set_title('Not-Cars Normalized Features')
Out[58]:
<matplotlib.text.Text at 0x11e9cf8d0>

Investigate HOG Features from Project Dataset

In [66]:
## Print Image from Project Set in HOG space ##
car_img = mpimg.imread(cars[car_ind])
noncar_img = mpimg.imread(notcars[-10])

car_hog_image = np.copy(cv2.cvtColor(car_img, cv2.COLOR_RGB2YCrCb))
noncar_hog_image = np.copy(cv2.cvtColor(noncar_img, cv2.COLOR_RGB2YCrCb))


# Ch1
_, ch1_car_hog_image = get_hog_features(car_hog_image[:,:,0], vis=True)
_, ch1_noncar_hog_image = get_hog_features(noncar_hog_image[:,:,0], vis=True)

# Ch2
_, ch2_car_hog_image = get_hog_features(car_hog_image[:,:,1], vis=True)
_, ch2_noncar_hog_image = get_hog_features(noncar_hog_image[:,:,1], vis=True)

# Ch3
_, ch3_car_hog_image = get_hog_features(car_hog_image[:,:,1], vis=True)
_, ch3_noncar_hog_image = get_hog_features(noncar_hog_image[:,:,2], vis=True)

fig2, ((ax_6, ax_0, ax_1, ax_2),(ax_7, ax_3, ax_4, ax_5)) = plt.subplots(2, 4, figsize=(24, 12))
fig2.tight_layout()

ax_0.imshow(ch1_car_hog_image, cmap='gray')
ax_0.set_title('Project Set Car - CH1 HOG Features')

ax_1.imshow(ch2_car_hog_image, cmap='gray')
ax_1.set_title('Project Set Car - CH2 HOG Features')

ax_2.imshow(ch3_car_hog_image, cmap='gray')
ax_2.set_title('Project Set Car - CH3 HOG Features')

ax_3.imshow(ch1_noncar_hog_image, cmap='gray')
ax_3.set_title('Project Set Non-Car - CH1 HOG Features')

ax_4.imshow(ch2_noncar_hog_image, cmap='gray')
ax_4.set_title('Project Set Non-Car - CH2 HOG Features')

ax_5.imshow(ch3_noncar_hog_image, cmap='gray')
ax_5.set_title('Project Set Non-Car - CH3 HOG Features')

ax_6.imshow(car_img)
ax_6.set_title('Project Set Car Image')

ax_7.imshow(noncar_img)
ax_7.set_title('Project Set Non-Car Image')


print('Feature Vector size for Cars:', len(car_features[car_ind]))
print('Using HOG parameters of:',HOG_ORIENTATIONS, 'HOG Orientations |', HOG_PIXELS_PER_CELL, 'HOG Pixels per cell |',
HOG_CELLS_PER_BLOCK, 'HOG cells per Block',
    'and', HIST_NBINS,'histogram bins')
Feature Vector size for Cars: 5676
Using HOG paraameters of: 9 HOG Orientations | 8 HOG Pixels per cell | 2 HOG cells per Block and 128 histogram bins

Investigate HOG Features from Udacity Dataset

In [63]:
## Print Image from Udacity Augmented Set in HOG space ##
car_ind = np.random.randint(0, len(udacity_cars))
car_img = mpimg.imread(udacity_cars[car_ind])
noncar_img = mpimg.imread(udacity_notcars[-10])
# Convert to YCrCb for for HOG Extraction
udacity_car_hog_image = np.copy(cv2.cvtColor(car_img, cv2.COLOR_RGB2YCrCb))
udacity_noncar_hog_image = np.copy(cv2.cvtColor(noncar_img, cv2.COLOR_RGB2YCrCb))


# Ch1
_, ch1_car_hog_image = get_hog_features(udacity_car_hog_image[:,:,0], vis=True)
_, ch1_noncar_hog_image = get_hog_features(udacity_noncar_hog_image[:,:,0], vis=True)

# Ch2
_, ch2_car_hog_image = get_hog_features(udacity_car_hog_image[:,:,1], vis=True)
_, ch2_noncar_hog_image = get_hog_features(udacity_noncar_hog_image[:,:,1], vis=True)

# Ch3
_, ch3_car_hog_image = get_hog_features(udacity_car_hog_image[:,:,1], vis=True)
_, ch3_noncar_hog_image = get_hog_features(udacity_noncar_hog_image[:,:,2], vis=True)

fig2, ((ax_6, ax_0, ax_1, ax_2),(ax_7, ax_3, ax_4, ax_5)) = plt.subplots(2, 4, figsize=(24, 12))
fig2.tight_layout()

ax_0.imshow(ch1_car_hog_image, cmap='gray')
ax_0.set_title('Udacity Set Car - CH1 HOG Features')

ax_1.imshow(ch2_car_hog_image, cmap='gray')
ax_1.set_title('Udacity Set Car - CH2 HOG Features')

ax_2.imshow(ch3_car_hog_image, cmap='gray')
ax_2.set_title('Udacity Set Car - CH3 HOG Features')

ax_3.imshow(ch1_noncar_hog_image, cmap='gray')
ax_3.set_title('Udacity Set Non-Car - CH1 HOG Features')

ax_4.imshow(ch2_noncar_hog_image, cmap='gray')
ax_4.set_title('Udacity Set Non-Car - CH2 HOG Features')

ax_5.imshow(ch3_noncar_hog_image, cmap='gray')
ax_5.set_title('Udacity Set Non-Car - CH3 HOG Features')

ax_6.imshow(car_img)
ax_6.set_title('Udacity Set Car Image')

ax_7.imshow(noncar_img)
ax_7.set_title('Udacity Set Non-Car Image')


print('Feature Vector size for Cars:', len(car_features[car_ind]))
print('Using HOG parameters of:',HOG_ORIENTATIONS, 'HOG Orientations |', HOG_PIXELS_PER_CELL, 'HOG Pixels per cell |',
HOG_CELLS_PER_BLOCK, 'HOG cells per Block',
    'and', HIST_NBINS,'histogram bins')
Feature Vector size for Cars: 5676
Using HOG parameters of: 9 HOG Orientations | 8 HOG Pixels per cell | 2 HOG cells per Block and 128 histogram bins
In [67]:
# Define the labels vector
y = np.hstack((np.ones(len(car_features)), np.zeros(len(notcar_features))))
In [68]:
# Split up data into randomized training and test sets
rand_state = np.random.randint(0, 100)
X_train, X_test, y_train, y_test = train_test_split(
    scaled_X, y, test_size=VALIDATION_PORTION, random_state=rand_state)
print('Feature vector length:', len(X_train[0]))
Feature vector length: 5676

Train using Support Vector Classifier

In [69]:
svc = LinearSVC()
t=time.time()
svc.fit(X_train, y_train)
t2 = time.time()
print(round(t2-t, 2), 'Seconds to train SVC...')

# Check the score of the SVC
print('Test Accuracy of SVC = ', round(svc.score(X_test, y_test), 4))
# Check the prediction time for a single sample
t=time.time()
n_predict = N_PREDICTIONS
print('SVC predicts: ', svc.predict(X_test[0:n_predict]))
print('For these',n_predict, 'labels: ', y_test[0:n_predict])
t2 = time.time()
print(round(t2-t, 5), 'Seconds to predict', n_predict,'labels with SVC')
107.17 Seconds to train SVC...
Test Accuracy of SVC =  0.9885
SVC predicts:  [ 1.  0.  0.  0.  0.  1.  1.  1.  0.  1.  1.  0.  0.  0.  0.  0.  1.  0.
  1.  1.  0.  0.  1.  0.  0.  0.  1.  1.  0.  0.  0.  1.  1.  1.  0.  0.
  0.  0.  0.  0.  0.  0.  1.  0.  0.  0.  1.  0.  0.  1.  1.  0.  1.  1.
  0.  0.  0.  0.  0.  1.  0.  0.  1.  0.  0.  1.  0.  1.  1.  1.  1.  0.
  0.  0.  0.  1.  0.  1.  1.  1.  1.  1.  0.  1.  0.  0.  0.  0.  1.  0.
  1.  0.  1.  1.  1.  0.  0.  1.  1.  0.]
For these 100 labels:  [ 1.  0.  0.  0.  0.  1.  1.  1.  0.  1.  1.  0.  0.  0.  0.  0.  1.  0.
  1.  1.  0.  0.  1.  0.  0.  0.  1.  1.  0.  0.  0.  1.  1.  1.  0.  0.
  0.  0.  0.  0.  0.  0.  1.  0.  0.  0.  1.  0.  0.  1.  1.  0.  1.  1.
  0.  0.  0.  0.  0.  1.  0.  0.  1.  0.  0.  1.  0.  1.  1.  1.  1.  0.
  0.  1.  0.  1.  0.  1.  1.  1.  1.  1.  0.  1.  0.  0.  0.  0.  1.  0.
  1.  0.  1.  1.  1.  0.  0.  1.  1.  0.]
0.09304 Seconds to predict 100 labels with SVC
In [70]:
#Save Support Vector Classifier to Datacache
def save_to_datacache(support_vector_classifier, datacache_dir=DATACACHE_DIRECTORY, 
                      override_datacache=OVERWRITE_DATACACHE):
    os.makedirs(datacache_dir, exist_ok=True)
    svc_pickle = os.path.join(datacache_dir,"svc_pickle.p")
    if override_datacache or not os.path.exists(svc_pickle): 
        svc_hyperparameters = {'svc': svc,
                               'X_SCALER':X_scaler,
                               'SPATIAL': SPATIAL, 
                               'HIST_NBINS': HIST_NBINS,
                               'COLOR_SPACE': COLOR_SPACE,
                               'HOG_ORIENTATIONS': HOG_ORIENTATIONS,
                               'HOG_PIXELS_PER_CELL': HOG_PIXELS_PER_CELL,
                               'HOG_CELLS_PER_BLOCK': HOG_CELLS_PER_BLOCK,
                               'HOG_CHANNEL': HOG_CHANNEL,
                               'SW_SPATIAL_FEAT_FLAG': SW_SPATIAL_FEAT_FLAG,
                               'SW_HOG_FEAT_FLAG': SW_HOG_FEAT_FLAG,
                               'SW_COLOR_HIST_FEAT_FLAG': SW_COLOR_HIST_FEAT_FLAG
                              }

        pickle.dump(svc_hyperparameters, open(svc_pickle, "wb"))
    
# Save classifier and parameters to datacache directory  
save_to_datacache(svc)

Vehicle Detection and Tracking

Re-Initialize Imports

In [71]:
%matplotlib inline
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import cv2
import time
import os
import pickle
from skimage.feature import hog
from sklearn.svm import LinearSVC
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from scipy.ndimage.measurements import label

Re-initialize Constants from Pickle File

In [117]:
## Directories ##
WORKING_DIRECTORY = 'data/'
DATACACHE_DIRECTORY = os.path.join(WORKING_DIRECTORY, 'datacache/')
svc_pickle = os.path.join(DATACACHE_DIRECTORY,"svc_pickle.p")
TESTING_DATASET_DIRECTORY = 'testing_dataset/'
TESTING_PIPELINE_SETUP_DIR= 'test_images/'
testset_path = "{}{}{}".format(WORKING_DIRECTORY, TESTING_PIPELINE_SETUP_DIR, '*.jpg')
with open(svc_pickle, mode='rb') as f:
    svc_hyperparameters = pickle.load(f)
    
## Feature Extraction Parameters ##
SVC = svc_hyperparameters['svc']
X_SCALER = svc_hyperparameters['X_SCALER']
# Spatial Binning
SW_SPATIAL_FEAT_FLAG = svc_hyperparameters['SW_SPATIAL_FEAT_FLAG'] 
SPATIAL = svc_hyperparameters['SPATIAL']
BIN_SPATIAL_SIZE = (SPATIAL, SPATIAL)
# Color Histogram
SW_COLOR_HIST_FEAT_FLAG = svc_hyperparameters['SW_COLOR_HIST_FEAT_FLAG']
HIST_NBINS = svc_hyperparameters['HIST_NBINS']
COLOR_SPACE = svc_hyperparameters['COLOR_SPACE']
# HOG Parameters
SW_HOG_FEAT_FLAG = svc_hyperparameters['SW_HOG_FEAT_FLAG']
HOG_ORIENTATIONS = svc_hyperparameters['HOG_ORIENTATIONS']
HOG_PIXELS_PER_CELL = svc_hyperparameters['HOG_PIXELS_PER_CELL']
HOG_CELLS_PER_BLOCK = svc_hyperparameters['HOG_CELLS_PER_BLOCK']
HOG_CHANNEL = svc_hyperparameters['HOG_CHANNEL']

## Sliding Windows Parameters ##
SW_XSTART_STOPS = [(200, None), (256, 1000)]
SW_YSTART_STOPS = [(384, 640), (384, None)]
SW_XY_WINDOWS = [(96,96),(128,128)]
SW_XY_OVERLAPS = [(.450,.480),(.21,.280)] 

## Parameters - HOG Sub-Sampling ##
SW_YSTART = 400
SW_YSTOP = 656
SW_SCALES = [1.0, 1.5, 1.75]
SW_CONVERT_COLOR = 'RGB2YCrCb'

## Vehicle Detection & Smoothing Parameters ##
BBOX_COLOR = (0, 255, 0)
BBOX_THICK = 5
SMOOTHING_FACTOR = 13

Explore Detection Technique (1) - Sliding Windows

In [73]:
# Define a function to draw bounding boxes
def draw_boxes(img, bboxes, color=BBOX_COLOR, thick=BBOX_THICK):
    # Make a copy of the image
    imcopy = np.copy(img)
    # Iterate through the bounding boxes
    for bbox in bboxes:
        # Draw a rectangle given bbox coordinates
        cv2.rectangle(imcopy, (bbox[0][0], bbox[0][1]), (bbox[1][0],bbox[1][1]), color, thick)
    return imcopy
In [74]:
# Define a wrapper function for passing in a list of slidw_window parameters
def slide_windows(img, x_start_stops=[[None, None]],
                  y_start_stops=[[None, None]],
                  xy_windows=[(64, 64)],
                  xy_overlaps=[(0.5, 0.5)]):
    windows = []
    for i in range(len(x_start_stops)):
        if len(x_start_stops) == len(xy_windows) and len(x_start_stops) == len(xy_overlaps):
            windows.extend(slide_window(img, np.asarray(x_start_stops[i]), np.asarray(y_start_stops[i]),
                                np.asarray(xy_windows[i]), np.asarray(xy_overlaps[i])))
        else:
            windows.extend(slide_window(img, np.asarray(x_start_stops[i]), np.asarray(y_start_stops[i]),
                                np.asarray(xy_windows[0]), np.asarray(xy_overlaps[0])))
    return np.concatenate(windows)
In [75]:
# Define a function that takes an image, start and stop positions in both x and y, 
# window size (x and y dimensions), and overlap fraction (for both x and y)
def slide_window(img, x_start_stop=[None, None],
                 y_start_stop=[None, None], 
                 xy_window=(64, 64), 
                 xy_overlap=(0.5, 0.5)):
    window_list=[]
    # If x and/or y start/stop positions not defined, set to image size
    if x_start_stop[0] == None:
        x_start_stop[0] = 0
    if x_start_stop[1] == None or x_start_stop[1] >= img.shape[1]:
        x_start_stop[1] = img.shape[1]
    if y_start_stop[0] == None:
        y_start_stop[0] = 0
    if y_start_stop[1] == None or y_start_stop[1] >= img.shape[0]:
        y_start_stop[1] = img.shape[0]

    # Compute the span of the region to be searched
    xspan = x_start_stop[1] - x_start_stop[0]
    yspan = y_start_stop[1] - y_start_stop[0]
    
    # Compute the number of pixels per step in x/y
    nx_pix_per_step = np.int(xy_window[0]*(1 - xy_overlap[0]))
    ny_pix_per_step = np.int(xy_window[1]*(1 - xy_overlap[1]))
    
    # Compute the number of windows in x/y
    nx_buffer = np.int(xy_window[0]*(xy_overlap[0]))
    ny_buffer = np.int(xy_window[1]*(xy_overlap[1]))
    nx_windows = np.int((xspan-nx_buffer)/nx_pix_per_step)
    ny_windows = np.int((yspan-ny_buffer)/ny_pix_per_step)

    # Loop through finding x and y window positions
    for ys in range(ny_windows):
        for xs in range(nx_windows):
            # Calculate window position
            startx = xs*nx_pix_per_step + x_start_stop[0]
            endx = startx + xy_window[0]
            starty = ys*ny_pix_per_step + y_start_stop[0]
            endy = starty + xy_window[1]
            
            # Append window position to list
            window_list.append([[(startx, starty), (endx, endy)]])
    return window_list

Visualize Method

This method is to be used by the Debugging code cells throught the notebook. This is to make it wasier to plot lists of images

In [76]:
def visualize(fig, rows, cols, imgs, titles):
    for i, img in enumerate(imgs):
        plt.subplot(rows, cols, i+1)
        plt.title(i+1)
        img_dims = len(img.shape)
        if img_dims < 3:
            plt.imshow(img, cmap='hot')
            plt.title(titles[i])
        else:
            plt.imshow(img)
            plt.title(titles[i])

Feature Extractor Function - Single Image

This function is very similar to the extract_features() function noted above accept that it requires a single image to check against rather than list of images

In [83]:
def single_img_features(img, color_space=COLOR_SPACE, 
                        spatial_size=BIN_SPATIAL_SIZE,
                        hist_bins=HIST_NBINS, 
                        orient=HOG_ORIENTATIONS, 
                        pix_per_cell=HOG_PIXELS_PER_CELL, 
                        cell_per_block=HOG_CELLS_PER_BLOCK,
                        hog_channel=HOG_CHANNEL, 
                        spatial_feat=SW_SPATIAL_FEAT_FLAG,
                        hist_feat=SW_COLOR_HIST_FEAT_FLAG, 
                        hog_feat=SW_HOG_FEAT_FLAG):
    
    #1) Define an empty list to receive features
    img_features = []
    #2) Apply color conversion if other than 'RGB'
    if color_space != 'RGB':
        if color_space == 'HSV':
            feature_image = cv2.cvtColor(img, cv2.COLOR_RGB2HSV)
        elif color_space == 'LUV':
            feature_image = cv2.cvtColor(img, cv2.COLOR_RGB2LUV)
        elif color_space == 'HLS':
            feature_image = cv2.cvtColor(img, cv2.COLOR_RGB2HLS)
        elif color_space == 'YUV':
            feature_image = cv2.cvtColor(img, cv2.COLOR_RGB2YUV)
        elif color_space == 'YCrCb':
            feature_image = cv2.cvtColor(img, cv2.COLOR_RGB2YCrCb)
    else: feature_image = np.copy(img)      

    #3) Compute spatial features if flag is set
    if spatial_feat == True:
        spatial_features = bin_spatial(feature_image, size=spatial_size)
    #5) Compute histogram features if flag is set
    if hist_feat == True:
        hist_features = color_hist(feature_image, nbins=hist_bins)
        #6) Append features to list
        #img_features.append(hist_features)
    #7) Compute HOG features if flag is set
    if hog_feat == True:
        # Call get_hog_features() with vis=False, feature_vec=True
        hog_image = hog_image = np.copy(cv2.cvtColor(img, cv2.COLOR_RGB2YCrCb))
        hog_shape = np.asarray(hog_image.shape)
        if hog_channel == 'ALL':
            hog_features = []
            for channel in range(len(hog_shape)):
                hog_features.append(get_hog_features(hog_image[:,:,channel], 
                                    orient, pix_per_cell, cell_per_block, 
                                    vis=False, feature_vec=True))
            hog_features = np.ravel(hog_features)
        else:
            hog_features = get_hog_features(feature_image[:,:,hog_channel], orient, 
                        pix_per_cell, cell_per_block, vis=False, feature_vec=True)
            
        # Append the new feature vector to the features list
        # Allow for flagged setting of feature vectors (spatial, hist, hog) must maintain the ordering
        if(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == True):
            img_features.append(np.concatenate((spatial_features, hist_features, hog_features)))
        elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == True):
            img_features.append(np.concatenate((hist_features, hog_features)))
        elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == True):
            img_features.append(np.array(hog_features))
        elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == True):
            img_features.append(np.concatenate((spatial_features, hog_features)))
        elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == False):
            img_features.append(np.array(spatial_features))
        elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == False):
            img_features.append(np.concatenate((spatial_features, hist_features)))
        elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == False):
            img_features.append(np.array(hist_features))
        else:
            img_features.append(np.concatenate(feature_image))
    #9) Return concatenated array of features
    return np.concatenate(img_features)

Search Windows Function - Key Helper Function

To implement a robust window detection algorithm, we require a function you that accepts an image as well as an arbitrary number of windows and performs a search on the windows, utilizing the SVC to predict bounding boxes for Cars. This can be a handy tool for any of the following detection techniques. In fact all 3 algortihms I perform utilizer search windows to some capacity.

In [84]:
def search_windows(img, windows, svc=SVC, 
                   X_scaler=X_SCALER, 
                   color_space=COLOR_SPACE, 
                   spatial_size=BIN_SPATIAL_SIZE, 
                   hist_bins=HIST_NBINS, 
                   orient=HOG_ORIENTATIONS, 
                   pix_per_cell=HOG_PIXELS_PER_CELL, 
                   cell_per_block=HOG_CELLS_PER_BLOCK, 
                   hog_channel=HOG_CHANNEL, 
                   spatial_feat=SW_SPATIAL_FEAT_FLAG, 
                   hist_feat=SW_COLOR_HIST_FEAT_FLAG, 
                   hog_feat=SW_HOG_FEAT_FLAG):
            
    #1) Create an empty list to receive positive detection windows
    on_windows = []
    heatmap = np.zeros_like(img[:,:,0])    
    #2) Iterate over all windows in the list
    for window in windows:
        test_img = cv2.resize(img[window[0][1]:window[1][1], window[0][0]:window[1][0]], 
                              (DEFAULT_LENGTH, DEFAULT_WIDTH)) 
        #4) Extract features for that window using single_img_features()
        features = single_img_features(test_img)
        #5) Scale extracted features to be fed to classifier
        test_features = X_scaler.transform(list(np.array(features).reshape(1, -1)))
        #6) Predict using classifier
        prediction = svc.predict(test_features)
        #7) If positive (prediction == 1) then save the window
        if prediction == 1: # Car detected
            on_windows.append(window)
            heatmap[window[0][1]:window[1][1], window[0][0]:window[1][0]] +=1

    #8) Return windows for positive detections
    return on_windows, heatmap
    

Select images to test Sliding Windows Implementation

In [85]:
# Try Scaling Windows on Test Images
image_paths = glob.glob(testset_path, recursive=True)
print('Found',len(image_paths),'images in directory:', testset_path)
Found 6 images in directory: data/test_images/*.jpg
In [86]:
def apply_threshold(heatmap, threshold):
    # Zero out pixels below the threshold
    heatmap[heatmap <= threshold] = 0
    return heatmap

def draw_single_frame_labeled_bboxes(img, labels):
    # Iterate through all detected cars
    for label in labels:
        for car_number in range(1, label[1] + 1):
            #Find pixels with each car_number label value
            nonzero = (label[0] == car_number).nonzero()
            # Identify x and y values of those pixels
            nonzeroy = np.array(nonzero[0])
            nonzerox = np.array(nonzero[1])
            #Define a bounding box based on min/max x and y
            bbox = ((np.min(nonzerox), np.min(nonzeroy)), (np.max(nonzerox), np.max(nonzeroy)))
            #Draw the box on the image
            cv2.rectangle(img, bbox[0], bbox[1], BBOX_COLOR, BBOX_THICK)
        # Return the image
    return img

Sliding Windows Visualization - (Great for Debugging)

Define a single function that can extract features using sliding windows and make predictions

Note: This function is essentially duplicate code from my previous slide wiindows techniques implemented throughout.

In [126]:
carslist = []
out_images = []
out_titles = []
labels = []


for img_path in image_paths:
    t1 = time.time()
    img = mpimg.imread(img_path)
    img_shape = img.shape
    img = np.copy(img)
    draw_img = np.copy(img)
    #Make a heatmap of zeros
    heatmap = np.zeros_like(img[:,:,0])
    threshold = 0
    filename = os.path.split(img_path)[-1]
    denorm_img = denormalize_pixels(img)
    
    windows = slide_windows(denorm_img, x_start_stops=SW_XSTART_STOPS, 
                              y_start_stops=SW_YSTART_STOPS, 
                              xy_windows=SW_XY_WINDOWS, 
                              xy_overlaps=SW_XY_OVERLAPS)
    
    hot_windows, heatmap = search_windows(denorm_img, windows)
    print('BBoxes Found:', len(hot_windows))
    
    window_img = draw_boxes(denorm_img, hot_windows, color=BBOX_COLOR, thick=BBOX_THICK)
    labels = label(apply_threshold(heatmap, threshold))
    
    # Draw bounding boxes on a copy of the input image       
    window_img_thresh = draw_single_frame_labeled_bboxes(draw_img, [labels])

    out_images.append(window_img)
    out_titles.append('windowed_'+filename)
    out_images.append(heatmap)
    out_titles.append('heatmapped_'+filename)
    out_images.append(window_img_thresh)
    out_titles.append('thresholded_'+filename)
    
    print(time.time()-t1, 'seconds to process one image search', len(windows), 'windows')

fig = plt.figure(figsize=(12,24))
visualize(fig, 8, 3, out_images, out_titles)
BBoxes Found: 1
1.2547149658203125 seconds to process one image search 97 windows
BBoxes Found: 0
0.8132469654083252 seconds to process one image search 97 windows
BBoxes Found: 0
1.5187509059906006 seconds to process one image search 97 windows
BBoxes Found: 1
0.9834010601043701 seconds to process one image search 97 windows
BBoxes Found: 0
0.8997938632965088 seconds to process one image search 97 windows
BBoxes Found: 1
0.6672577857971191 seconds to process one image search 97 windows

We want a more efficient way to detect vehicles. This approach will allow for only a single call to get HOG features. The pipeline will then find a sub sample

In [119]:
def convert_color(img, conv=SW_CONVERT_COLOR):
    if conv == 'RGB2YCrCb':
        return cv2.cvtColor(np.copy(img), cv2.COLOR_RGB2YCrCb)
    if conv == 'BGR2YCrCb':
        return cv2.cvtColor(np.copy(img), cv2.COLOR_BGR2YCrCb)
    if conv == 'RGB2LUV':
        return cv2.cvtColor(np.copy(img), cv2.COLOR_RGB2LUV)
    if conv == 'RGB2HSV':
        return cv2.cvtColor(np.copy(img), cv2.COLOR_RGB2HSV)

Define a single function for debugging that can extract features using hog sub-sampling and make predictions

Note: This function is essentially duplicate code from my primary HOG subsampling implemented below

In [127]:
out_images = []
out_maps = []
out_titles = []
out_boxes = []

## Parameters - HOG Sub-Sampling ##
ystart = SW_YSTART
ystop = SW_YSTOP
scale = SW_SCALES
spatial_size=BIN_SPATIAL_SIZE
hist_bins=HIST_NBINS
orient=HOG_ORIENTATIONS
pix_per_cell=HOG_PIXELS_PER_CELL
cell_per_block=HOG_CELLS_PER_BLOCK
hog_channel=HOG_CHANNEL
spatial_feat=SW_SPATIAL_FEAT_FLAG
hog_feat=SW_HOG_FEAT_FLAG
hist_feat=SW_COLOR_HIST_FEAT_FLAG


#Iterate over the test images
for img_path in image_paths:
    img_boxes = []
    t1 = time.time()
    count = 0
    img = mpimg.imread(img_path)
    img = np.copy(img)
    denorm_img = denormalize_pixels(img)
    draw_img = np.copy(denorm_img)
    
    #Make a heatmap of zeros
    heatmap = np.zeros_like(denorm_img[:,:,0])
    img_to_search = denorm_img[ystart:ystop,:,:]
    ctrans_tosearch = convert_color(img_to_search, conv=SW_CONVERT_COLOR)
    
    if type(scale) == 'float':
        scale = [scale]

    for scle in scale:
        if scle != 1:
            imshape = ctrans_tosearch.shape
            ctrans_tosearch = cv2.resize(ctrans_tosearch, (np.int(imshape[1]/scle), np.int(imshape[0]/scle)))

        ch1 = ctrans_tosearch[:,:,0]
        ch2 = ctrans_tosearch[:,:,1]
        ch3 = ctrans_tosearch[:,:,2]

        # Define blocks and steps as above
        nxblocks = (ch1.shape[1] // pix_per_cell)-1
        nyblocks = (ch1.shape[0] // pix_per_cell)-1 
        nfeat_per_block = orient*cell_per_block**2
        window = 64 # HOG_PIXELS_PER_CELL*HOG_PIXELS_PER_CELL # 8 cells and 8 pix per cell
        nblocks_per_window = (window // pix_per_cell)-1  # The // division is used for integers (for indices)
        cells_per_step = 2  # Instead of overlap, define how many cells to step
        nxsteps = (nxblocks - nblocks_per_window) // cells_per_step # The // division is used for integers (for indices)
        nysteps = (nyblocks - nblocks_per_window) // cells_per_step # The // division is used for integers (for indices)

        # Compute individual channel HOG features for the entire image
        hog1 = get_hog_features(ch1, orient, pix_per_cell, cell_per_block, feature_vec=False)
        hog2 = get_hog_features(ch2, orient, pix_per_cell, cell_per_block, feature_vec=False)
        hog3 = get_hog_features(ch3, orient, pix_per_cell, cell_per_block, feature_vec=False)


        for xb in range(nxsteps):
            for yb in range(nysteps):
                count += 1
                ypos = yb*cells_per_step
                xpos = xb*cells_per_step

                # Extract HOG for this particular patch
                if SW_HOG_FEAT_FLAG == True: # Should always be true
                    hog_feat1 = hog1[ypos:ypos+nblocks_per_window, xpos:xpos+nblocks_per_window].ravel() 
                    hog_feat2 = hog2[ypos:ypos+nblocks_per_window, xpos:xpos+nblocks_per_window].ravel() 
                    hog_feat3 = hog3[ypos:ypos+nblocks_per_window, xpos:xpos+nblocks_per_window].ravel() 
                    hog_features = np.hstack((hog_feat1, hog_feat2, hog_feat3))

                xleft = xpos*pix_per_cell
                ytop = ypos*pix_per_cell

                # Extract the image patch
                subimg = cv2.resize(ctrans_tosearch[ytop:ytop+window, xleft:xleft+window], (DEFAULT_LENGTH, DEFAULT_WIDTH))

                # Get color features
                if SW_SPATIAL_FEAT_FLAG == True:
                    spatial_features = bin_spatial(subimg, size=BIN_SPATIAL_SIZE)
                if SW_COLOR_HIST_FEAT_FLAG == True:    
                    hist_features = color_hist(subimg, nbins=HIST_NBINS)


                # Append the new feature vector to the features list
                # Allow for flagged setting of feature vectors (spatial, hist, hog) must maintain the ordering
                if(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == True):
                    test_feats = np.hstack((spatial_features, hist_features, hog_features))
                elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == True):
                    test_feats = np.hstack((hist_features, hog_features))
                elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == True):
                    test_feats = np.hstack((hog_features))
                elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == True):
                    test_feats = np.hstack((spatial_features, hog_features))
                elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == False):
                    test_feats = np.hstack((spatial_features))
                elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == False):
                    test_feats = np.hstack((spatial_features, hist_features))
                elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == False):
                    test_feats = np.hstack((hist_features))
                else:
                    test_feats = np.hstack((np.ravel(img)))


                # Scale features and make a prediction
                test_features = X_SCALER.transform(test_feats.reshape(1, -1))
                test_prediction = SVC.predict(test_features)

                if test_prediction == 1:
                    xbox_left = np.int(xleft*scle)
                    ytop_draw = np.int(ytop*scle)
                    win_draw = np.int(window*scle)
                    cv2.rectangle(draw_img,(xbox_left, ytop_draw+ystart),
                                  (xbox_left+win_draw, ytop_draw+win_draw+ystart),BBOX_COLOR,6)
                    img_boxes.append(((xbox_left, ytop_draw+ystart),
                                  (xbox_left+win_draw,ytop_draw+win_draw+ystart)))

                    heatmap[ytop_draw+ystart:ytop_draw+win_draw+ystart, xbox_left:xbox_left+win_draw] +=1
            print(time.time()-t1, 'seconds to run, total windows = ', count)

        out_images.append(draw_img)
        out_titles.append(os.path.split(img_path)[-1])
        out_images.append(heatmap)
        out_titles.append(os.path.split(img_path)[-1])
        out_maps.append(heatmap)
        out_boxes.append(img_boxes)
    
fig = plt.figure(figsize=(12,36))
visualize(fig, 8, 2, out_images, out_titles)
0.45661282539367676 seconds to run, total windows =  12
0.46999597549438477 seconds to run, total windows =  24
0.4815518856048584 seconds to run, total windows =  36
0.4921448230743408 seconds to run, total windows =  48
0.5032479763031006 seconds to run, total windows =  60
0.5137488842010498 seconds to run, total windows =  72
0.5254108905792236 seconds to run, total windows =  84
0.5362110137939453 seconds to run, total windows =  96
0.5498838424682617 seconds to run, total windows =  108
0.5610418319702148 seconds to run, total windows =  120
0.5712909698486328 seconds to run, total windows =  132
0.58272385597229 seconds to run, total windows =  144
0.5940430164337158 seconds to run, total windows =  156
0.6049909591674805 seconds to run, total windows =  168
0.6157498359680176 seconds to run, total windows =  180
0.6273880004882812 seconds to run, total windows =  192
0.638286828994751 seconds to run, total windows =  204
0.6516258716583252 seconds to run, total windows =  216
0.6651279926300049 seconds to run, total windows =  228
0.6772499084472656 seconds to run, total windows =  240
0.689323902130127 seconds to run, total windows =  252
0.7021188735961914 seconds to run, total windows =  264
0.7139909267425537 seconds to run, total windows =  276
0.7258620262145996 seconds to run, total windows =  288
0.738710880279541 seconds to run, total windows =  300
0.7575018405914307 seconds to run, total windows =  312
0.7752909660339355 seconds to run, total windows =  324
0.7920668125152588 seconds to run, total windows =  336
0.8184919357299805 seconds to run, total windows =  348
0.8572258949279785 seconds to run, total windows =  360
0.8734619617462158 seconds to run, total windows =  372
0.8985090255737305 seconds to run, total windows =  384
0.9203639030456543 seconds to run, total windows =  396
0.9410219192504883 seconds to run, total windows =  408
0.9624888896942139 seconds to run, total windows =  420
0.9762458801269531 seconds to run, total windows =  432
0.9879608154296875 seconds to run, total windows =  444
1.0008490085601807 seconds to run, total windows =  456
1.0146808624267578 seconds to run, total windows =  468
1.0281569957733154 seconds to run, total windows =  480
1.0463500022888184 seconds to run, total windows =  492
1.0730209350585938 seconds to run, total windows =  504
1.11729097366333 seconds to run, total windows =  516
1.1409409046173096 seconds to run, total windows =  528
1.1568529605865479 seconds to run, total windows =  540
1.1700408458709717 seconds to run, total windows =  552
1.1846837997436523 seconds to run, total windows =  564
1.2008450031280518 seconds to run, total windows =  576
1.2319188117980957 seconds to run, total windows =  588
1.2448399066925049 seconds to run, total windows =  600
1.263329029083252 seconds to run, total windows =  612
1.2772529125213623 seconds to run, total windows =  624
1.2896268367767334 seconds to run, total windows =  636
1.30256986618042 seconds to run, total windows =  648
1.3146398067474365 seconds to run, total windows =  660
1.3281869888305664 seconds to run, total windows =  672
1.3407528400421143 seconds to run, total windows =  684
1.3578238487243652 seconds to run, total windows =  696
1.373863935470581 seconds to run, total windows =  708
1.3879828453063965 seconds to run, total windows =  720
1.4045989513397217 seconds to run, total windows =  732
1.416538953781128 seconds to run, total windows =  744
1.4280009269714355 seconds to run, total windows =  756
1.4403979778289795 seconds to run, total windows =  768
1.4576449394226074 seconds to run, total windows =  780
1.4692318439483643 seconds to run, total windows =  792
1.4804198741912842 seconds to run, total windows =  804
1.4922819137573242 seconds to run, total windows =  816
1.5051629543304443 seconds to run, total windows =  828
1.517071008682251 seconds to run, total windows =  840
1.528390884399414 seconds to run, total windows =  852
1.541719913482666 seconds to run, total windows =  864
1.5567679405212402 seconds to run, total windows =  876
1.5717267990112305 seconds to run, total windows =  888
1.5862069129943848 seconds to run, total windows =  900
1.612224817276001 seconds to run, total windows =  912
1.7724578380584717 seconds to run, total windows =  918
1.7776148319244385 seconds to run, total windows =  924
1.7841429710388184 seconds to run, total windows =  930
1.7946059703826904 seconds to run, total windows =  936
1.8048717975616455 seconds to run, total windows =  942
1.811471939086914 seconds to run, total windows =  948
1.8198609352111816 seconds to run, total windows =  954
1.8278210163116455 seconds to run, total windows =  960
1.8334228992462158 seconds to run, total windows =  966
1.8392019271850586 seconds to run, total windows =  972
1.84584379196167 seconds to run, total windows =  978
1.8530588150024414 seconds to run, total windows =  984
1.863149881362915 seconds to run, total windows =  990
1.869485855102539 seconds to run, total windows =  996
1.8752989768981934 seconds to run, total windows =  1002
1.881058931350708 seconds to run, total windows =  1008
1.8868370056152344 seconds to run, total windows =  1014
1.892561912536621 seconds to run, total windows =  1020
1.89815092086792 seconds to run, total windows =  1026
1.9040789604187012 seconds to run, total windows =  1032
1.910019874572754 seconds to run, total windows =  1038
1.9158289432525635 seconds to run, total windows =  1044
1.9212148189544678 seconds to run, total windows =  1050
1.9267268180847168 seconds to run, total windows =  1056
1.9327049255371094 seconds to run, total windows =  1062
1.9395978450775146 seconds to run, total windows =  1068
1.9509530067443848 seconds to run, total windows =  1074
1.9588508605957031 seconds to run, total windows =  1080
1.9649128913879395 seconds to run, total windows =  1086
1.9707980155944824 seconds to run, total windows =  1092
1.9779210090637207 seconds to run, total windows =  1098
1.986297845840454 seconds to run, total windows =  1104
1.992008924484253 seconds to run, total windows =  1110
1.9973418712615967 seconds to run, total windows =  1116
2.0037379264831543 seconds to run, total windows =  1122
2.009946823120117 seconds to run, total windows =  1128
2.0168240070343018 seconds to run, total windows =  1134
2.022469997406006 seconds to run, total windows =  1140
2.0286009311676025 seconds to run, total windows =  1146
2.0370919704437256 seconds to run, total windows =  1152
2.0441999435424805 seconds to run, total windows =  1158
2.0555670261383057 seconds to run, total windows =  1164
2.0640318393707275 seconds to run, total windows =  1170
2.0697898864746094 seconds to run, total windows =  1176
2.0756490230560303 seconds to run, total windows =  1182
2.081784963607788 seconds to run, total windows =  1188
2.0879099369049072 seconds to run, total windows =  1194
2.0947790145874023 seconds to run, total windows =  1200
2.100494861602783 seconds to run, total windows =  1206
2.1556408405303955 seconds to run, total windows =  1208
2.1573498249053955 seconds to run, total windows =  1210
2.159811019897461 seconds to run, total windows =  1212
2.1615469455718994 seconds to run, total windows =  1214
2.1635169982910156 seconds to run, total windows =  1216
2.1653809547424316 seconds to run, total windows =  1218
2.167301893234253 seconds to run, total windows =  1220
2.169041872024536 seconds to run, total windows =  1222
2.1706178188323975 seconds to run, total windows =  1224
2.172590970993042 seconds to run, total windows =  1226
2.1747779846191406 seconds to run, total windows =  1228
2.1766958236694336 seconds to run, total windows =  1230
2.178524971008301 seconds to run, total windows =  1232
2.1803789138793945 seconds to run, total windows =  1234
2.1833508014678955 seconds to run, total windows =  1236
2.1867339611053467 seconds to run, total windows =  1238
2.1883838176727295 seconds to run, total windows =  1240
2.189929962158203 seconds to run, total windows =  1242
2.19146990776062 seconds to run, total windows =  1244
2.194180965423584 seconds to run, total windows =  1246
2.196934938430786 seconds to run, total windows =  1248
2.1989009380340576 seconds to run, total windows =  1250
2.200471878051758 seconds to run, total windows =  1252
2.2020180225372314 seconds to run, total windows =  1254
2.203565835952759 seconds to run, total windows =  1256
2.2051799297332764 seconds to run, total windows =  1258
0.3852670192718506 seconds to run, total windows =  12
0.3974900245666504 seconds to run, total windows =  24
0.40891599655151367 seconds to run, total windows =  36
0.4205760955810547 seconds to run, total windows =  48
0.43283605575561523 seconds to run, total windows =  60
0.4445159435272217 seconds to run, total windows =  72
0.455812931060791 seconds to run, total windows =  84
0.46641111373901367 seconds to run, total windows =  96
0.47783398628234863 seconds to run, total windows =  108
0.48950695991516113 seconds to run, total windows =  120
0.501147985458374 seconds to run, total windows =  132
0.5123810768127441 seconds to run, total windows =  144
0.5245730876922607 seconds to run, total windows =  156
0.5362629890441895 seconds to run, total windows =  168
0.5505180358886719 seconds to run, total windows =  180
0.5634589195251465 seconds to run, total windows =  192
0.5756950378417969 seconds to run, total windows =  204
0.592979907989502 seconds to run, total windows =  216
0.6108670234680176 seconds to run, total windows =  228
0.6244111061096191 seconds to run, total windows =  240
0.6404929161071777 seconds to run, total windows =  252
0.65647292137146 seconds to run, total windows =  264
0.6696939468383789 seconds to run, total windows =  276
0.6844100952148438 seconds to run, total windows =  288
0.6996519565582275 seconds to run, total windows =  300
0.7117340564727783 seconds to run, total windows =  312
0.7237861156463623 seconds to run, total windows =  324
0.735145092010498 seconds to run, total windows =  336
0.7483129501342773 seconds to run, total windows =  348
0.7720720767974854 seconds to run, total windows =  360
0.7861568927764893 seconds to run, total windows =  372
0.8048229217529297 seconds to run, total windows =  384
0.8236539363861084 seconds to run, total windows =  396
0.836982011795044 seconds to run, total windows =  408
0.8503830432891846 seconds to run, total windows =  420
0.8686919212341309 seconds to run, total windows =  432
0.8824660778045654 seconds to run, total windows =  444
0.8954401016235352 seconds to run, total windows =  456
0.9070310592651367 seconds to run, total windows =  468
0.919335126876831 seconds to run, total windows =  480
0.9316120147705078 seconds to run, total windows =  492
0.9446420669555664 seconds to run, total windows =  504
0.957772970199585 seconds to run, total windows =  516
0.9703269004821777 seconds to run, total windows =  528
0.9819579124450684 seconds to run, total windows =  540
0.9932401180267334 seconds to run, total windows =  552
1.006221055984497 seconds to run, total windows =  564
1.0202250480651855 seconds to run, total windows =  576
1.0336990356445312 seconds to run, total windows =  588
1.0498220920562744 seconds to run, total windows =  600
1.0675110816955566 seconds to run, total windows =  612
1.0825109481811523 seconds to run, total windows =  624
1.0958209037780762 seconds to run, total windows =  636
1.1085410118103027 seconds to run, total windows =  648
1.1198201179504395 seconds to run, total windows =  660
1.1321170330047607 seconds to run, total windows =  672
1.144989013671875 seconds to run, total windows =  684
1.157170057296753 seconds to run, total windows =  696
1.17159104347229 seconds to run, total windows =  708
1.183495044708252 seconds to run, total windows =  720
1.1958909034729004 seconds to run, total windows =  732
1.209118127822876 seconds to run, total windows =  744
1.223257064819336 seconds to run, total windows =  756
1.2364039421081543 seconds to run, total windows =  768
1.2647149562835693 seconds to run, total windows =  780
1.2778429985046387 seconds to run, total windows =  792
1.2924010753631592 seconds to run, total windows =  804
1.306149959564209 seconds to run, total windows =  816
1.3184120655059814 seconds to run, total windows =  828
1.3312790393829346 seconds to run, total windows =  840
1.3453938961029053 seconds to run, total windows =  852
1.3581581115722656 seconds to run, total windows =  864
1.3709239959716797 seconds to run, total windows =  876
1.381580114364624 seconds to run, total windows =  888
1.3937311172485352 seconds to run, total windows =  900
1.4054291248321533 seconds to run, total windows =  912
1.5629498958587646 seconds to run, total windows =  918
1.5695159435272217 seconds to run, total windows =  924
1.576343059539795 seconds to run, total windows =  930
1.5821480751037598 seconds to run, total windows =  936
1.5901861190795898 seconds to run, total windows =  942
1.5996720790863037 seconds to run, total windows =  948
1.6058471202850342 seconds to run, total windows =  954
1.6131160259246826 seconds to run, total windows =  960
1.6199259757995605 seconds to run, total windows =  966
1.625473976135254 seconds to run, total windows =  972
1.6317479610443115 seconds to run, total windows =  978
1.637470006942749 seconds to run, total windows =  984
1.6445050239562988 seconds to run, total windows =  990
1.6502060890197754 seconds to run, total windows =  996
1.656632900238037 seconds to run, total windows =  1002
1.662118911743164 seconds to run, total windows =  1008
1.6682660579681396 seconds to run, total windows =  1014
1.6741969585418701 seconds to run, total windows =  1020
1.6793110370635986 seconds to run, total windows =  1026
1.6862730979919434 seconds to run, total windows =  1032
1.6940860748291016 seconds to run, total windows =  1038
1.7014870643615723 seconds to run, total windows =  1044
1.7071759700775146 seconds to run, total windows =  1050
1.7130630016326904 seconds to run, total windows =  1056
1.7191441059112549 seconds to run, total windows =  1062
1.724848985671997 seconds to run, total windows =  1068
1.7304420471191406 seconds to run, total windows =  1074
1.7371609210968018 seconds to run, total windows =  1080
1.7447481155395508 seconds to run, total windows =  1086
1.750701904296875 seconds to run, total windows =  1092
1.756983995437622 seconds to run, total windows =  1098
1.7623889446258545 seconds to run, total windows =  1104
1.7742679119110107 seconds to run, total windows =  1110
1.785991907119751 seconds to run, total windows =  1116
1.7986791133880615 seconds to run, total windows =  1122
1.8085010051727295 seconds to run, total windows =  1128
1.8165440559387207 seconds to run, total windows =  1134
1.8233060836791992 seconds to run, total windows =  1140
1.830502986907959 seconds to run, total windows =  1146
1.8365731239318848 seconds to run, total windows =  1152
1.8452129364013672 seconds to run, total windows =  1158
1.8513360023498535 seconds to run, total windows =  1164
1.8579881191253662 seconds to run, total windows =  1170
1.8650100231170654 seconds to run, total windows =  1176
1.8723258972167969 seconds to run, total windows =  1182
1.8816800117492676 seconds to run, total windows =  1188
1.8887879848480225 seconds to run, total windows =  1194
1.8951349258422852 seconds to run, total windows =  1200
1.9006710052490234 seconds to run, total windows =  1206
1.9465670585632324 seconds to run, total windows =  1208
1.9485080242156982 seconds to run, total windows =  1210
1.9503929615020752 seconds to run, total windows =  1212
1.952455997467041 seconds to run, total windows =  1214
1.9549529552459717 seconds to run, total windows =  1216
1.9570739269256592 seconds to run, total windows =  1218
1.9591050148010254 seconds to run, total windows =  1220
1.9609150886535645 seconds to run, total windows =  1222
1.9627211093902588 seconds to run, total windows =  1224
1.9647700786590576 seconds to run, total windows =  1226
1.966958999633789 seconds to run, total windows =  1228
1.9685931205749512 seconds to run, total windows =  1230
1.9701809883117676 seconds to run, total windows =  1232
1.9721429347991943 seconds to run, total windows =  1234
1.9742510318756104 seconds to run, total windows =  1236
1.9760899543762207 seconds to run, total windows =  1238
1.979809045791626 seconds to run, total windows =  1240
1.983755111694336 seconds to run, total windows =  1242
1.985943078994751 seconds to run, total windows =  1244
1.9887199401855469 seconds to run, total windows =  1246
1.9919140338897705 seconds to run, total windows =  1248
1.9939310550689697 seconds to run, total windows =  1250
1.9956419467926025 seconds to run, total windows =  1252
1.9971959590911865 seconds to run, total windows =  1254
1.998737096786499 seconds to run, total windows =  1256
2.0011091232299805 seconds to run, total windows =  1258
0.3936581611633301 seconds to run, total windows =  12
0.40456104278564453 seconds to run, total windows =  24
0.4157400131225586 seconds to run, total windows =  36
0.42734408378601074 seconds to run, total windows =  48
0.44073009490966797 seconds to run, total windows =  60
0.45287203788757324 seconds to run, total windows =  72
0.464385986328125 seconds to run, total windows =  84
0.47760605812072754 seconds to run, total windows =  96
0.48958396911621094 seconds to run, total windows =  108
0.501007080078125 seconds to run, total windows =  120
0.5124201774597168 seconds to run, total windows =  132
0.5242421627044678 seconds to run, total windows =  144
0.5355710983276367 seconds to run, total windows =  156
0.5483319759368896 seconds to run, total windows =  168
0.5599780082702637 seconds to run, total windows =  180
0.5731561183929443 seconds to run, total windows =  192
0.590069055557251 seconds to run, total windows =  204
0.6075801849365234 seconds to run, total windows =  216
0.6225411891937256 seconds to run, total windows =  228
0.6342260837554932 seconds to run, total windows =  240
0.650611162185669 seconds to run, total windows =  252
0.6639750003814697 seconds to run, total windows =  264
0.6790471076965332 seconds to run, total windows =  276
0.693047046661377 seconds to run, total windows =  288
0.7086470127105713 seconds to run, total windows =  300
0.7209560871124268 seconds to run, total windows =  312
0.7329151630401611 seconds to run, total windows =  324
0.7450499534606934 seconds to run, total windows =  336
0.757418155670166 seconds to run, total windows =  348
0.7706501483917236 seconds to run, total windows =  360
0.7820000648498535 seconds to run, total windows =  372
0.7955350875854492 seconds to run, total windows =  384
0.809528112411499 seconds to run, total windows =  396
0.8346569538116455 seconds to run, total windows =  408
0.8512051105499268 seconds to run, total windows =  420
0.8636701107025146 seconds to run, total windows =  432
0.8790850639343262 seconds to run, total windows =  444
0.8916110992431641 seconds to run, total windows =  456
0.9030940532684326 seconds to run, total windows =  468
0.91538405418396 seconds to run, total windows =  480
0.9330270290374756 seconds to run, total windows =  492
0.9477250576019287 seconds to run, total windows =  504
0.9588921070098877 seconds to run, total windows =  516
0.9709680080413818 seconds to run, total windows =  528
0.982896089553833 seconds to run, total windows =  540
0.995690107345581 seconds to run, total windows =  552
1.0089480876922607 seconds to run, total windows =  564
1.021090030670166 seconds to run, total windows =  576
1.0351130962371826 seconds to run, total windows =  588
1.0502660274505615 seconds to run, total windows =  600
1.0625860691070557 seconds to run, total windows =  612
1.077782154083252 seconds to run, total windows =  624
1.093536138534546 seconds to run, total windows =  636
1.106374979019165 seconds to run, total windows =  648
1.1227400302886963 seconds to run, total windows =  660
1.1451060771942139 seconds to run, total windows =  672
1.163694143295288 seconds to run, total windows =  684
1.1785809993743896 seconds to run, total windows =  696
1.1940951347351074 seconds to run, total windows =  708
1.2064721584320068 seconds to run, total windows =  720
1.2216181755065918 seconds to run, total windows =  732
1.2338430881500244 seconds to run, total windows =  744
1.2479631900787354 seconds to run, total windows =  756
1.2618350982666016 seconds to run, total windows =  768
1.2741310596466064 seconds to run, total windows =  780
1.285161018371582 seconds to run, total windows =  792
1.2951700687408447 seconds to run, total windows =  804
1.3101091384887695 seconds to run, total windows =  816
1.3226380348205566 seconds to run, total windows =  828
1.3371961116790771 seconds to run, total windows =  840
1.354931116104126 seconds to run, total windows =  852
1.3659570217132568 seconds to run, total windows =  864
1.38124418258667 seconds to run, total windows =  876
1.396064043045044 seconds to run, total windows =  888
1.4114770889282227 seconds to run, total windows =  900
1.42319917678833 seconds to run, total windows =  912
1.5742990970611572 seconds to run, total windows =  918
1.5847790241241455 seconds to run, total windows =  924
1.5944550037384033 seconds to run, total windows =  930
1.6023740768432617 seconds to run, total windows =  936
1.611732006072998 seconds to run, total windows =  942
1.6187939643859863 seconds to run, total windows =  948
1.6252059936523438 seconds to run, total windows =  954
1.633681058883667 seconds to run, total windows =  960
1.640989065170288 seconds to run, total windows =  966
1.646576166152954 seconds to run, total windows =  972
1.6519811153411865 seconds to run, total windows =  978
1.6579291820526123 seconds to run, total windows =  984
1.6636590957641602 seconds to run, total windows =  990
1.6694769859313965 seconds to run, total windows =  996
1.6747219562530518 seconds to run, total windows =  1002
1.681321144104004 seconds to run, total windows =  1008
1.6883909702301025 seconds to run, total windows =  1014
1.6942100524902344 seconds to run, total windows =  1020
1.7002551555633545 seconds to run, total windows =  1026
1.7064321041107178 seconds to run, total windows =  1032
1.711874008178711 seconds to run, total windows =  1038
1.7174510955810547 seconds to run, total windows =  1044
1.7229101657867432 seconds to run, total windows =  1050
1.728823184967041 seconds to run, total windows =  1056
1.7343230247497559 seconds to run, total windows =  1062
1.7417221069335938 seconds to run, total windows =  1068
1.7478480339050293 seconds to run, total windows =  1074
1.7536849975585938 seconds to run, total windows =  1080
1.7594640254974365 seconds to run, total windows =  1086
1.7656581401824951 seconds to run, total windows =  1092
1.7710320949554443 seconds to run, total windows =  1098
1.7766880989074707 seconds to run, total windows =  1104
1.7846260070800781 seconds to run, total windows =  1110
1.7917890548706055 seconds to run, total windows =  1116
1.7986581325531006 seconds to run, total windows =  1122
1.8059780597686768 seconds to run, total windows =  1128
1.8141419887542725 seconds to run, total windows =  1134
1.8195171356201172 seconds to run, total windows =  1140
1.827876091003418 seconds to run, total windows =  1146
1.835301160812378 seconds to run, total windows =  1152
1.8504371643066406 seconds to run, total windows =  1158
1.861220121383667 seconds to run, total windows =  1164
1.8676080703735352 seconds to run, total windows =  1170
1.8758840560913086 seconds to run, total windows =  1176
1.8835911750793457 seconds to run, total windows =  1182
1.8921260833740234 seconds to run, total windows =  1188
1.8985211849212646 seconds to run, total windows =  1194
1.907806158065796 seconds to run, total windows =  1200
1.9159040451049805 seconds to run, total windows =  1206
1.9656050205230713 seconds to run, total windows =  1208
1.9674291610717773 seconds to run, total windows =  1210
1.969635009765625 seconds to run, total windows =  1212
1.9714031219482422 seconds to run, total windows =  1214
1.9734551906585693 seconds to run, total windows =  1216
1.9752860069274902 seconds to run, total windows =  1218
1.9769940376281738 seconds to run, total windows =  1220
1.979552984237671 seconds to run, total windows =  1222
1.9826569557189941 seconds to run, total windows =  1224
1.9867660999298096 seconds to run, total windows =  1226
1.9903440475463867 seconds to run, total windows =  1228
1.9924681186676025 seconds to run, total windows =  1230
1.9940199851989746 seconds to run, total windows =  1232
1.9956810474395752 seconds to run, total windows =  1234
1.9975299835205078 seconds to run, total windows =  1236
1.9993340969085693 seconds to run, total windows =  1238
2.0009090900421143 seconds to run, total windows =  1240
2.002943992614746 seconds to run, total windows =  1242
2.0048980712890625 seconds to run, total windows =  1244
2.0064589977264404 seconds to run, total windows =  1246
2.0084121227264404 seconds to run, total windows =  1248
2.010483980178833 seconds to run, total windows =  1250
2.0121190547943115 seconds to run, total windows =  1252
2.0138630867004395 seconds to run, total windows =  1254
2.0168371200561523 seconds to run, total windows =  1256
2.0196900367736816 seconds to run, total windows =  1258
0.406282901763916 seconds to run, total windows =  12
0.41852498054504395 seconds to run, total windows =  24
0.4306309223175049 seconds to run, total windows =  36
0.4420011043548584 seconds to run, total windows =  48
0.4534471035003662 seconds to run, total windows =  60
0.4648559093475342 seconds to run, total windows =  72
0.4759230613708496 seconds to run, total windows =  84
0.48716092109680176 seconds to run, total windows =  96
0.49908900260925293 seconds to run, total windows =  108
0.51096510887146 seconds to run, total windows =  120
0.5242869853973389 seconds to run, total windows =  132
0.5355091094970703 seconds to run, total windows =  144
0.5460090637207031 seconds to run, total windows =  156
0.5574290752410889 seconds to run, total windows =  168
0.5728979110717773 seconds to run, total windows =  180
0.5859091281890869 seconds to run, total windows =  192
0.5986580848693848 seconds to run, total windows =  204
0.6117329597473145 seconds to run, total windows =  216
0.6299200057983398 seconds to run, total windows =  228
0.6425631046295166 seconds to run, total windows =  240
0.6571290493011475 seconds to run, total windows =  252
0.6783220767974854 seconds to run, total windows =  264
0.6903231143951416 seconds to run, total windows =  276
0.702441930770874 seconds to run, total windows =  288
0.7196199893951416 seconds to run, total windows =  300
0.7351760864257812 seconds to run, total windows =  312
0.7505779266357422 seconds to run, total windows =  324
0.7685770988464355 seconds to run, total windows =  336
0.7806711196899414 seconds to run, total windows =  348
0.7958889007568359 seconds to run, total windows =  360
0.8105309009552002 seconds to run, total windows =  372
0.8252439498901367 seconds to run, total windows =  384
0.8381280899047852 seconds to run, total windows =  396
0.8573060035705566 seconds to run, total windows =  408
0.8853099346160889 seconds to run, total windows =  420
0.8966479301452637 seconds to run, total windows =  432
0.9116969108581543 seconds to run, total windows =  444
0.9269580841064453 seconds to run, total windows =  456
0.9423360824584961 seconds to run, total windows =  468
0.953840970993042 seconds to run, total windows =  480
0.9730160236358643 seconds to run, total windows =  492
0.988224983215332 seconds to run, total windows =  504
0.9995419979095459 seconds to run, total windows =  516
1.0107030868530273 seconds to run, total windows =  528
1.0227539539337158 seconds to run, total windows =  540
1.0358920097351074 seconds to run, total windows =  552
1.048949956893921 seconds to run, total windows =  564
1.0604729652404785 seconds to run, total windows =  576
1.07265305519104 seconds to run, total windows =  588
1.0848760604858398 seconds to run, total windows =  600
1.0955591201782227 seconds to run, total windows =  612
1.1070120334625244 seconds to run, total windows =  624
1.1210510730743408 seconds to run, total windows =  636
1.1345059871673584 seconds to run, total windows =  648
1.1488969326019287 seconds to run, total windows =  660
1.1619601249694824 seconds to run, total windows =  672
1.1791579723358154 seconds to run, total windows =  684
1.1917400360107422 seconds to run, total windows =  696
1.205029010772705 seconds to run, total windows =  708
1.2175750732421875 seconds to run, total windows =  720
1.2393519878387451 seconds to run, total windows =  732
1.2555570602416992 seconds to run, total windows =  744
1.272702932357788 seconds to run, total windows =  756
1.289686918258667 seconds to run, total windows =  768
1.3025269508361816 seconds to run, total windows =  780
1.315190076828003 seconds to run, total windows =  792
1.330590009689331 seconds to run, total windows =  804
1.3411250114440918 seconds to run, total windows =  816
1.353044033050537 seconds to run, total windows =  828
1.3674860000610352 seconds to run, total windows =  840
1.3823769092559814 seconds to run, total windows =  852
1.3952229022979736 seconds to run, total windows =  864
1.4079670906066895 seconds to run, total windows =  876
1.422313928604126 seconds to run, total windows =  888
1.4350409507751465 seconds to run, total windows =  900
1.4476571083068848 seconds to run, total windows =  912
1.633263111114502 seconds to run, total windows =  918
1.6403229236602783 seconds to run, total windows =  924
1.64774489402771 seconds to run, total windows =  930
1.6549410820007324 seconds to run, total windows =  936
1.661972999572754 seconds to run, total windows =  942
1.6685171127319336 seconds to run, total windows =  948
1.6801319122314453 seconds to run, total windows =  954
1.6905651092529297 seconds to run, total windows =  960
1.6976099014282227 seconds to run, total windows =  966
1.7043969631195068 seconds to run, total windows =  972
1.7115330696105957 seconds to run, total windows =  978
1.717155933380127 seconds to run, total windows =  984
1.726457118988037 seconds to run, total windows =  990
1.7333440780639648 seconds to run, total windows =  996
1.7400670051574707 seconds to run, total windows =  1002
1.746717929840088 seconds to run, total windows =  1008
1.7527709007263184 seconds to run, total windows =  1014
1.7581610679626465 seconds to run, total windows =  1020
1.7648839950561523 seconds to run, total windows =  1026
1.7729170322418213 seconds to run, total windows =  1032
1.7822380065917969 seconds to run, total windows =  1038
1.7910420894622803 seconds to run, total windows =  1044
1.7994060516357422 seconds to run, total windows =  1050
1.805337905883789 seconds to run, total windows =  1056
1.8109169006347656 seconds to run, total windows =  1062
1.8179550170898438 seconds to run, total windows =  1068
1.8246490955352783 seconds to run, total windows =  1074
1.8306701183319092 seconds to run, total windows =  1080
1.8377280235290527 seconds to run, total windows =  1086
1.8435120582580566 seconds to run, total windows =  1092
1.8488800525665283 seconds to run, total windows =  1098
1.8551208972930908 seconds to run, total windows =  1104
1.861781120300293 seconds to run, total windows =  1110
1.867872953414917 seconds to run, total windows =  1116
1.8902039527893066 seconds to run, total windows =  1122
1.8975930213928223 seconds to run, total windows =  1128
1.9050369262695312 seconds to run, total windows =  1134
1.9102449417114258 seconds to run, total windows =  1140
1.916722059249878 seconds to run, total windows =  1146
1.9263279438018799 seconds to run, total windows =  1152
1.9346520900726318 seconds to run, total windows =  1158
1.9398670196533203 seconds to run, total windows =  1164
1.9469869136810303 seconds to run, total windows =  1170
1.9528930187225342 seconds to run, total windows =  1176
1.9600889682769775 seconds to run, total windows =  1182
1.9678070545196533 seconds to run, total windows =  1188
1.976043939590454 seconds to run, total windows =  1194
1.982023000717163 seconds to run, total windows =  1200
1.9875969886779785 seconds to run, total windows =  1206
2.0393199920654297 seconds to run, total windows =  1208
2.0416219234466553 seconds to run, total windows =  1210
2.043678045272827 seconds to run, total windows =  1212
2.0462350845336914 seconds to run, total windows =  1214
2.048454999923706 seconds to run, total windows =  1216
2.0500590801239014 seconds to run, total windows =  1218
2.05163311958313 seconds to run, total windows =  1220
2.053421974182129 seconds to run, total windows =  1222
2.0557188987731934 seconds to run, total windows =  1224
2.0577340126037598 seconds to run, total windows =  1226
2.0596840381622314 seconds to run, total windows =  1228
2.061440944671631 seconds to run, total windows =  1230
2.063349962234497 seconds to run, total windows =  1232
2.0654590129852295 seconds to run, total windows =  1234
2.069014072418213 seconds to run, total windows =  1236
2.0713050365448 seconds to run, total windows =  1238
2.074445962905884 seconds to run, total windows =  1240
2.0766749382019043 seconds to run, total windows =  1242
2.079495906829834 seconds to run, total windows =  1244
2.0820329189300537 seconds to run, total windows =  1246
2.0841989517211914 seconds to run, total windows =  1248
2.0859320163726807 seconds to run, total windows =  1250
2.0877950191497803 seconds to run, total windows =  1252
2.089900016784668 seconds to run, total windows =  1254
2.0916941165924072 seconds to run, total windows =  1256
2.0939249992370605 seconds to run, total windows =  1258
0.4084351062774658 seconds to run, total windows =  12
0.4200439453125 seconds to run, total windows =  24
0.43210506439208984 seconds to run, total windows =  36
0.4431140422821045 seconds to run, total windows =  48
0.45439910888671875 seconds to run, total windows =  60
0.4656209945678711 seconds to run, total windows =  72
0.480942964553833 seconds to run, total windows =  84
0.49584293365478516 seconds to run, total windows =  96
0.5082170963287354 seconds to run, total windows =  108
0.5205779075622559 seconds to run, total windows =  120
0.5339450836181641 seconds to run, total windows =  132
0.5456640720367432 seconds to run, total windows =  144
0.5573790073394775 seconds to run, total windows =  156
0.5687580108642578 seconds to run, total windows =  168
0.5806589126586914 seconds to run, total windows =  180
0.5928549766540527 seconds to run, total windows =  192
0.6043550968170166 seconds to run, total windows =  204
0.6176738739013672 seconds to run, total windows =  216
0.6356339454650879 seconds to run, total windows =  228
0.6487040519714355 seconds to run, total windows =  240
0.6592240333557129 seconds to run, total windows =  252
0.671536922454834 seconds to run, total windows =  264
0.6858460903167725 seconds to run, total windows =  276
0.6977920532226562 seconds to run, total windows =  288
0.7102980613708496 seconds to run, total windows =  300
0.7250809669494629 seconds to run, total windows =  312
0.7398149967193604 seconds to run, total windows =  324
0.7514369487762451 seconds to run, total windows =  336
0.7639188766479492 seconds to run, total windows =  348
0.7780559062957764 seconds to run, total windows =  360
0.7891449928283691 seconds to run, total windows =  372
0.8027169704437256 seconds to run, total windows =  384
0.8205780982971191 seconds to run, total windows =  396
0.8362998962402344 seconds to run, total windows =  408
0.8497099876403809 seconds to run, total windows =  420
0.8624670505523682 seconds to run, total windows =  432
0.8757960796356201 seconds to run, total windows =  444
0.8905320167541504 seconds to run, total windows =  456
0.9072849750518799 seconds to run, total windows =  468
0.9202001094818115 seconds to run, total windows =  480
0.9394679069519043 seconds to run, total windows =  492
0.9559400081634521 seconds to run, total windows =  504
0.9694900512695312 seconds to run, total windows =  516
0.983889102935791 seconds to run, total windows =  528
1.0019938945770264 seconds to run, total windows =  540
1.0133299827575684 seconds to run, total windows =  552
1.0257868766784668 seconds to run, total windows =  564
1.0419549942016602 seconds to run, total windows =  576
1.0544118881225586 seconds to run, total windows =  588
1.0667119026184082 seconds to run, total windows =  600
1.0805881023406982 seconds to run, total windows =  612
1.0970261096954346 seconds to run, total windows =  624
1.1134600639343262 seconds to run, total windows =  636
1.1269540786743164 seconds to run, total windows =  648
1.1395349502563477 seconds to run, total windows =  660
1.1531519889831543 seconds to run, total windows =  672
1.1665980815887451 seconds to run, total windows =  684
1.1769769191741943 seconds to run, total windows =  696
1.1955950260162354 seconds to run, total windows =  708
1.2095890045166016 seconds to run, total windows =  720
1.221224069595337 seconds to run, total windows =  732
1.235456943511963 seconds to run, total windows =  744
1.2476279735565186 seconds to run, total windows =  756
1.260909080505371 seconds to run, total windows =  768
1.2733349800109863 seconds to run, total windows =  780
1.2852890491485596 seconds to run, total windows =  792
1.3026070594787598 seconds to run, total windows =  804
1.3157930374145508 seconds to run, total windows =  816
1.3321220874786377 seconds to run, total windows =  828
1.3469929695129395 seconds to run, total windows =  840
1.3596019744873047 seconds to run, total windows =  852
1.375148057937622 seconds to run, total windows =  864
1.394577980041504 seconds to run, total windows =  876
1.409193992614746 seconds to run, total windows =  888
1.4239020347595215 seconds to run, total windows =  900
1.4384500980377197 seconds to run, total windows =  912
1.614738941192627 seconds to run, total windows =  918
1.6205909252166748 seconds to run, total windows =  924
1.6278209686279297 seconds to run, total windows =  930
1.6338129043579102 seconds to run, total windows =  936
1.6400439739227295 seconds to run, total windows =  942
1.6458098888397217 seconds to run, total windows =  948
1.651573896408081 seconds to run, total windows =  954
1.6577270030975342 seconds to run, total windows =  960
1.6630918979644775 seconds to run, total windows =  966
1.6690049171447754 seconds to run, total windows =  972
1.6750669479370117 seconds to run, total windows =  978
1.6807489395141602 seconds to run, total windows =  984
1.6859920024871826 seconds to run, total windows =  990
1.6919920444488525 seconds to run, total windows =  996
1.6972949504852295 seconds to run, total windows =  1002
1.7030420303344727 seconds to run, total windows =  1008
1.709110975265503 seconds to run, total windows =  1014
1.714853048324585 seconds to run, total windows =  1020
1.7206640243530273 seconds to run, total windows =  1026
1.7269411087036133 seconds to run, total windows =  1032
1.7329809665679932 seconds to run, total windows =  1038
1.7384920120239258 seconds to run, total windows =  1044
1.7439959049224854 seconds to run, total windows =  1050
1.750248908996582 seconds to run, total windows =  1056
1.7557199001312256 seconds to run, total windows =  1062
1.7611780166625977 seconds to run, total windows =  1068
1.7666170597076416 seconds to run, total windows =  1074
1.7729198932647705 seconds to run, total windows =  1080
1.7788960933685303 seconds to run, total windows =  1086
1.784466028213501 seconds to run, total windows =  1092
1.7911350727081299 seconds to run, total windows =  1098
1.797278881072998 seconds to run, total windows =  1104
1.8023459911346436 seconds to run, total windows =  1110
1.8078949451446533 seconds to run, total windows =  1116
1.8152320384979248 seconds to run, total windows =  1122
1.826859951019287 seconds to run, total windows =  1128
1.841526985168457 seconds to run, total windows =  1134
1.850229024887085 seconds to run, total windows =  1140
1.858086109161377 seconds to run, total windows =  1146
1.8647189140319824 seconds to run, total windows =  1152
1.8712000846862793 seconds to run, total windows =  1158
1.879805088043213 seconds to run, total windows =  1164
1.88454008102417 seconds to run, total windows =  1170
1.89078688621521 seconds to run, total windows =  1176
1.8984029293060303 seconds to run, total windows =  1182
1.9054219722747803 seconds to run, total windows =  1188
1.9150800704956055 seconds to run, total windows =  1194
1.9239540100097656 seconds to run, total windows =  1200
1.931185007095337 seconds to run, total windows =  1206
1.983609914779663 seconds to run, total windows =  1208
1.9851670265197754 seconds to run, total windows =  1210
1.98671293258667 seconds to run, total windows =  1212
1.9885571002960205 seconds to run, total windows =  1214
1.990799903869629 seconds to run, total windows =  1216
1.994178056716919 seconds to run, total windows =  1218
1.9973840713500977 seconds to run, total windows =  1220
2.000545024871826 seconds to run, total windows =  1222
2.0024800300598145 seconds to run, total windows =  1224
2.0044009685516357 seconds to run, total windows =  1226
2.0069189071655273 seconds to run, total windows =  1228
2.009608030319214 seconds to run, total windows =  1230
2.0113608837127686 seconds to run, total windows =  1232
2.013843059539795 seconds to run, total windows =  1234
2.0162179470062256 seconds to run, total windows =  1236
2.018773078918457 seconds to run, total windows =  1238
2.021899938583374 seconds to run, total windows =  1240
2.0248799324035645 seconds to run, total windows =  1242
2.0279159545898438 seconds to run, total windows =  1244
2.0308239459991455 seconds to run, total windows =  1246
2.034842014312744 seconds to run, total windows =  1248
2.0372440814971924 seconds to run, total windows =  1250
2.0397329330444336 seconds to run, total windows =  1252
2.0418319702148438 seconds to run, total windows =  1254
2.0440421104431152 seconds to run, total windows =  1256
2.046281099319458 seconds to run, total windows =  1258
0.4433319568634033 seconds to run, total windows =  12
0.4611029624938965 seconds to run, total windows =  24
0.47208404541015625 seconds to run, total windows =  36
0.48541998863220215 seconds to run, total windows =  48
0.4973771572113037 seconds to run, total windows =  60
0.5087051391601562 seconds to run, total windows =  72
0.519780158996582 seconds to run, total windows =  84
0.5312070846557617 seconds to run, total windows =  96
0.5423569679260254 seconds to run, total windows =  108
0.5542590618133545 seconds to run, total windows =  120
0.5673441886901855 seconds to run, total windows =  132
0.5798871517181396 seconds to run, total windows =  144
0.5919570922851562 seconds to run, total windows =  156
0.6033251285552979 seconds to run, total windows =  168
0.6148760318756104 seconds to run, total windows =  180
0.6261930465698242 seconds to run, total windows =  192
0.6376771926879883 seconds to run, total windows =  204
0.6530520915985107 seconds to run, total windows =  216
0.6766560077667236 seconds to run, total windows =  228
0.6934981346130371 seconds to run, total windows =  240
0.7042341232299805 seconds to run, total windows =  252
0.7198410034179688 seconds to run, total windows =  264
0.7360401153564453 seconds to run, total windows =  276
0.7493669986724854 seconds to run, total windows =  288
0.7671899795532227 seconds to run, total windows =  300
0.7801241874694824 seconds to run, total windows =  312
0.8005411624908447 seconds to run, total windows =  324
0.8247799873352051 seconds to run, total windows =  336
0.8423821926116943 seconds to run, total windows =  348
0.86126708984375 seconds to run, total windows =  360
0.874906063079834 seconds to run, total windows =  372
0.8895940780639648 seconds to run, total windows =  384
0.902230978012085 seconds to run, total windows =  396
0.9172179698944092 seconds to run, total windows =  408
0.9337630271911621 seconds to run, total windows =  420
0.9453420639038086 seconds to run, total windows =  432
0.965468168258667 seconds to run, total windows =  444
0.9809601306915283 seconds to run, total windows =  456
0.9977521896362305 seconds to run, total windows =  468
1.0127291679382324 seconds to run, total windows =  480
1.0255591869354248 seconds to run, total windows =  492
1.0402960777282715 seconds to run, total windows =  504
1.0553719997406006 seconds to run, total windows =  516
1.0904080867767334 seconds to run, total windows =  528
1.1144201755523682 seconds to run, total windows =  540
1.1276960372924805 seconds to run, total windows =  552
1.1434080600738525 seconds to run, total windows =  564
1.174666166305542 seconds to run, total windows =  576
1.1993751525878906 seconds to run, total windows =  588
1.2232840061187744 seconds to run, total windows =  600
1.2441279888153076 seconds to run, total windows =  612
1.2644681930541992 seconds to run, total windows =  624
1.289788007736206 seconds to run, total windows =  636
1.3104901313781738 seconds to run, total windows =  648
1.3347601890563965 seconds to run, total windows =  660
1.3506340980529785 seconds to run, total windows =  672
1.371338129043579 seconds to run, total windows =  684
1.3889610767364502 seconds to run, total windows =  696
1.4005451202392578 seconds to run, total windows =  708
1.411924123764038 seconds to run, total windows =  720
1.4252121448516846 seconds to run, total windows =  732
1.4444911479949951 seconds to run, total windows =  744
1.459177017211914 seconds to run, total windows =  756
1.4806530475616455 seconds to run, total windows =  768
1.4979450702667236 seconds to run, total windows =  780
1.5113680362701416 seconds to run, total windows =  792
1.5238890647888184 seconds to run, total windows =  804
1.5370781421661377 seconds to run, total windows =  816
1.5562100410461426 seconds to run, total windows =  828
1.5792889595031738 seconds to run, total windows =  840
1.59375 seconds to run, total windows =  852
1.6081039905548096 seconds to run, total windows =  864
1.6231181621551514 seconds to run, total windows =  876
1.6384179592132568 seconds to run, total windows =  888
1.650712013244629 seconds to run, total windows =  900
1.6622099876403809 seconds to run, total windows =  912
1.8945941925048828 seconds to run, total windows =  918
1.90071702003479 seconds to run, total windows =  924
1.9064431190490723 seconds to run, total windows =  930
1.9138801097869873 seconds to run, total windows =  936
1.9215161800384521 seconds to run, total windows =  942
1.928189992904663 seconds to run, total windows =  948
1.9360971450805664 seconds to run, total windows =  954
1.9429781436920166 seconds to run, total windows =  960
1.9533271789550781 seconds to run, total windows =  966
1.9616150856018066 seconds to run, total windows =  972
1.9710869789123535 seconds to run, total windows =  978
1.986814022064209 seconds to run, total windows =  984
1.9983739852905273 seconds to run, total windows =  990
2.0169460773468018 seconds to run, total windows =  996
2.0419561862945557 seconds to run, total windows =  1002
2.0478570461273193 seconds to run, total windows =  1008
2.054893970489502 seconds to run, total windows =  1014
2.0647380352020264 seconds to run, total windows =  1020
2.088243007659912 seconds to run, total windows =  1026
2.1048879623413086 seconds to run, total windows =  1032
2.112243175506592 seconds to run, total windows =  1038
2.121246099472046 seconds to run, total windows =  1044
2.129703998565674 seconds to run, total windows =  1050
2.1424989700317383 seconds to run, total windows =  1056
2.1529550552368164 seconds to run, total windows =  1062
2.158769130706787 seconds to run, total windows =  1068
2.1652610301971436 seconds to run, total windows =  1074
2.178924083709717 seconds to run, total windows =  1080
2.189570188522339 seconds to run, total windows =  1086
2.19921612739563 seconds to run, total windows =  1092
2.2100491523742676 seconds to run, total windows =  1098
2.2160801887512207 seconds to run, total windows =  1104
2.225213050842285 seconds to run, total windows =  1110
2.2313430309295654 seconds to run, total windows =  1116
2.2387349605560303 seconds to run, total windows =  1122
2.246670961380005 seconds to run, total windows =  1128
2.2525200843811035 seconds to run, total windows =  1134
2.258397102355957 seconds to run, total windows =  1140
2.2644381523132324 seconds to run, total windows =  1146
2.270843029022217 seconds to run, total windows =  1152
2.280306100845337 seconds to run, total windows =  1158
2.2861251831054688 seconds to run, total windows =  1164
2.291965961456299 seconds to run, total windows =  1170
2.2976231575012207 seconds to run, total windows =  1176
2.3035850524902344 seconds to run, total windows =  1182
2.310652017593384 seconds to run, total windows =  1188
2.3167459964752197 seconds to run, total windows =  1194
2.323148012161255 seconds to run, total windows =  1200
2.329514980316162 seconds to run, total windows =  1206
2.376338005065918 seconds to run, total windows =  1208
2.3797171115875244 seconds to run, total windows =  1210
2.3822641372680664 seconds to run, total windows =  1212
2.3842780590057373 seconds to run, total windows =  1214
2.3872010707855225 seconds to run, total windows =  1216
2.3892719745635986 seconds to run, total windows =  1218
2.391541004180908 seconds to run, total windows =  1220
2.3938980102539062 seconds to run, total windows =  1222
2.3957881927490234 seconds to run, total windows =  1224
2.397426128387451 seconds to run, total windows =  1226
2.39919114112854 seconds to run, total windows =  1228
2.4009790420532227 seconds to run, total windows =  1230
2.4029719829559326 seconds to run, total windows =  1232
2.4048571586608887 seconds to run, total windows =  1234
2.4072539806365967 seconds to run, total windows =  1236
2.4090921878814697 seconds to run, total windows =  1238
2.4111480712890625 seconds to run, total windows =  1240
2.413079023361206 seconds to run, total windows =  1242
2.414921998977661 seconds to run, total windows =  1244
2.416673183441162 seconds to run, total windows =  1246
2.4188311100006104 seconds to run, total windows =  1248
2.420809030532837 seconds to run, total windows =  1250
2.4225881099700928 seconds to run, total windows =  1252
2.424596071243286 seconds to run, total windows =  1254
2.426457166671753 seconds to run, total windows =  1256
2.428443193435669 seconds to run, total windows =  1258
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-127-230561fec08f> in <module>()
    132 
    133 fig = plt.figure(figsize=(12,36))
--> 134 visualize(fig, 8, 2, out_images, out_titles)

<ipython-input-76-00765ab83ba4> in visualize(fig, rows, cols, imgs, titles)
      1 def visualize(fig, rows, cols, imgs, titles):
      2     for i, img in enumerate(imgs):
----> 3         plt.subplot(rows, cols, i+1)
      4         plt.title(i+1)
      5         img_dims = len(img.shape)

/Users/deanmwebb/anaconda/envs/sdc_dev/lib/python3.5/site-packages/matplotlib/pyplot.py in subplot(*args, **kwargs)
   1028 
   1029     fig = gcf()
-> 1030     a = fig.add_subplot(*args, **kwargs)
   1031     bbox = a.bbox
   1032     byebye = []

/Users/deanmwebb/anaconda/envs/sdc_dev/lib/python3.5/site-packages/matplotlib/figure.py in add_subplot(self, *args, **kwargs)
   1003                     self._axstack.remove(ax)
   1004 
-> 1005             a = subplot_class_factory(projection_class)(self, *args, **kwargs)
   1006 
   1007         self._axstack.add(key, a)

/Users/deanmwebb/anaconda/envs/sdc_dev/lib/python3.5/site-packages/matplotlib/axes/_subplots.py in __init__(self, fig, *args, **kwargs)
     62                     raise ValueError(
     63                         "num must be 1 <= num <= {maxn}, not {num}".format(
---> 64                             maxn=rows*cols, num=num))
     65                 self._subplotspec = GridSpec(rows, cols)[int(num) - 1]
     66                 # num - 1 for converting from MATLAB to python indexing

ValueError: num must be 1 <= num <= 16, not 17
In [ ]:
# Define a single function that can extract features using hog sub-sampling and make predictions
def find_cars(img, ystart=SW_YSTART,
              ystop=SW_YSTOP, 
              scale=SW_SCALES, 
              svc=SVC, 
              X_scaler=X_SCALER,
              orient=HOG_ORIENTATIONS, 
              pix_per_cell=HOG_PIXELS_PER_CELL, 
              cell_per_block=HOG_CELLS_PER_BLOCK,
              spatial_size=BIN_SPATIAL_SIZE, 
              hist_bins=HIST_NBINS,
              spatial_feat=SW_SPATIAL_FEAT_FLAG,
              hog_feat=SW_HOG_FEAT_FLAG,
              hist_feat=SW_COLOR_HIST_FEAT_FLAG):
    
    # If y start/stop positions not defined, set to image size      
    if ystart == None or ystart < 0:
        ystart = 384
    if ystop == None or ystop > img.shape[0]:
        ystop = img.shape[0]
    draw_img = np.copy(img)
    denormalized_img = denormalize_pixels(img)
    

    #Make a heatmap of zeros
    heatmap = np.zeros_like(denormalized_img[:,:,0])
    img_to_search = denormalized_img[ystart:ystop,:,:]
    ctrans_tosearch = convert_color(img_to_search, conv=SW_CONVERT_COLOR)
    
    # For each scale
    if type(scale) == 'float':
        scale = [scale]

    for scle in scale:
        if scle != 1:
            imshape = ctrans_tosearch.shape
            ctrans_tosearch = cv2.resize(ctrans_tosearch, (np.int(imshape[1]/scle), np.int(imshape[0]/scle)))

        ch1 = ctrans_tosearch[:,:,0]
        ch2 = ctrans_tosearch[:,:,1]
        ch3 = ctrans_tosearch[:,:,2]

        # Define blocks and steps as above
        nxblocks = (ch1.shape[1] // pix_per_cell)-1
        nyblocks = (ch1.shape[0] // pix_per_cell)-1 
        nfeat_per_block = orient*cell_per_block**2
        window = 64 # 8 cells and 8 pix per cell
        nblocks_per_window = (window // pix_per_cell)-1  # The // division is used for integers (for indices)
        cells_per_step = 1 # HOG_CELLS_PER_BLOCK  # Instead of overlap, define how many cells to step
        nxsteps = (nxblocks - nblocks_per_window) // cells_per_step # The // division is used for integers (for indices)
        nysteps = (nyblocks - nblocks_per_window) // cells_per_step # The // division is used for integers (for indices)

        # Compute individual channel HOG features for the entire image
        hog1 = get_hog_features(ch1, orient, pix_per_cell, cell_per_block, feature_vec=False)
        hog2 = get_hog_features(ch2, orient, pix_per_cell, cell_per_block, feature_vec=False)
        hog3 = get_hog_features(ch3, orient, pix_per_cell, cell_per_block, feature_vec=False)


        for xb in range(nxsteps):
            for yb in range(nysteps):
                ypos = yb*cells_per_step
                xpos = xb*cells_per_step

                # Extract HOG for this particular patch
                hog_feat1 = hog1[ypos:ypos+nblocks_per_window, xpos:xpos+nblocks_per_window].ravel() 
                hog_feat2 = hog2[ypos:ypos+nblocks_per_window, xpos:xpos+nblocks_per_window].ravel() 
                hog_feat3 = hog3[ypos:ypos+nblocks_per_window, xpos:xpos+nblocks_per_window].ravel() 
                hog_features = np.hstack((hog_feat1, hog_feat2, hog_feat3))

                xleft = xpos*pix_per_cell
                ytop = ypos*pix_per_cell

                # Extract the image patch
                subimg = cv2.resize(ctrans_tosearch[ytop:ytop+window, xleft:xleft+window], (DEFAULT_LENGTH, DEFAULT_WIDTH))

                # Get color features
                if SW_SPATIAL_FEAT_FLAG == True:
                    spatial_features = bin_spatial(subimg, size=BIN_SPATIAL_SIZE)
                if SW_COLOR_HIST_FEAT_FLAG == True:    
                    hist_features = color_hist(subimg, nbins=HIST_NBINS)


                # Append the new feature vector to the features list
                # Allow for flagged setting of feature vectors (spatial, hist, hog) must maintain the ordering
                if(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == True):
                    test_feats = np.hstack((spatial_features, hist_features, hog_features))
                elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == True):
                    test_feats = np.hstack((hist_features, hog_features))
                elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == True):
                    test_feats = np.hstack((hog_features))
                elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == True):
                    test_feats = np.hstack((spatial_features, hog_features))
                elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == False and SW_HOG_FEAT_FLAG == False):
                    test_feats = np.hstack((spatial_features))
                elif(SW_SPATIAL_FEAT_FLAG == True and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == False):
                    test_feats = np.hstack((spatial_features, hist_features))
                elif(SW_SPATIAL_FEAT_FLAG == False and SW_COLOR_HIST_FEAT_FLAG == True and SW_HOG_FEAT_FLAG == False):
                    test_feats = np.hstack((hist_features))
                else:
                    test_feats = np.hstack((np.ravel(img)))

                # Scale features and make a prediction
                test_features = X_scaler.transform(test_feats.reshape(1, -1))
                test_prediction = svc.predict(test_features)


                ## Check against classifier ## 
                if test_prediction == 1:
                    xbox_left = np.int(xleft*scle)
                    ytop_draw = np.int(ytop*scle)
                    win_draw = np.int(window*scle)
                    cv2.rectangle(draw_img,(xbox_left, ytop_draw+ystart),
                                  (xbox_left+win_draw, ytop_draw+win_draw+ystart),BBOX_COLOR,BBOX_THICK)
                    heatmap[ytop_draw+ystart:ytop_draw+win_draw+ystart, xbox_left:xbox_left+win_draw] +=1
    return draw_img, heatmap
In [ ]:
# DEFINE A CLASS TO RECEIVE THE CHARACTERISTICS OF EACH VEHICLE DETECTION
# Objects defined as "Vehicles" will be where multiple overlaping detections exists in the heatmap
class Vehicle():
    def __init__(self, bbox):
        car_lens = [car.car_number for car in carslist]
        if len(car_lens) > 0: 
            self.car_number = np.max(car_lens) + 1
        else: self.car_number = 0
        self.prev_detected = False # Flag sets if the Vehicle was detected in the last iteration
        self.cur_detected = True # Flag sets if the Vehicle is detected in the current iteration
        self.n_detections = 1 # number of times this vehicle has been detected
        self.n_non_detections = 0 # number of consecutive times this vehicle has not been detected
        self.xpixels = np.arange(bbox[0][0], bbox[1][0]+1) # Pixel x values of last detection
        self.ypixels = np.arange(bbox[0][1], bbox[1][1]+1) # Pixel y values of last detection
        self.recent_xfitted = []
        self.recent_xfitted.append(bbox[0][0]) # x position of the last n fits of the bounding box
        self.bestx = bbox[0][0] # X position of the current fit
        self.recent_yfitted = []
        self.recent_yfitted.append(bbox[0][1]) # Y position of the last n fits of the bounding box
        self.besty = bbox[0][1] # Average y position of the current fit
        self.recent_wfitted = []
        self.recent_wfitted.append(bbox[1][0])
        self.bestw = bbox[1][0] # Average width of the last n fits
        self.recent_hfitted = []
        self.recent_hfitted.append(bbox[1][1]) # Height of the last n fits of the bounding box
        self.besth = bbox[1][1] # Average height of the last n fits
        self.bounding_box = bbox
In [ ]:
# Define a function that Implements Smoothing Factor for Multi-Fram Object Tracking
def draw_multi_frame_labeled_bboxes(img, labels, smoothing_factor=1, keep_weight=15, remove_threshold = 15, debug=False):
    noisy_pix_thresh= 4e2
    img = np.copy(img)
    # Set all cur_detected values to false for current frame
    for car in carslist:
        car.cur_detected = False
    
    for label in labels:
        # Iterate through all detected labels
        for car_number in range(1, label[1] + 1):
            # Find pixels with each car_number label value
            nonzero = (label[0] == car_number).nonzero()
            # Identify x and y values of those pixels
            nonzeroy = np.array(nonzero[0])
            nonzerox = np.array(nonzero[1])
            # Define a bounding box based on min/max x and y
            bbox = ((np.min(nonzerox), np.min(nonzeroy)), (np.max(nonzerox), np.max(nonzeroy)))

            # Check if bounding box appears in carslist
            found_match = False
            for car in carslist:               
                # Create comparison matrix
                bbox_flatten = []
                bbox_flatten.append(bbox[0])
                bbox_flatten.append(bbox[1])
                bbox_flatten = [x for xs in bbox_flatten for x in xs]
                
                car_bbox_flat = []
                car_bbox_flat.append(car.bounding_box[0])
                car_bbox_flat.append(car.bounding_box[1])
                car_bbox_flat = [x for xs in car_bbox_flat for x in xs]
                
                if(np.allclose(bbox_flatten, car_bbox_flat, atol=13)):
                    found_match = True
                    if debug:
                        print('Found a match. Car Bounding Box', car.bounding_box, '| length nonzerox:',len(nonzerox),
                             '| length nonzeroy:',len(nonzeroy))
                        print('Checked against Bounding box:',bbox)

                    car.n_detections += 1                
                    car.prev_detected = found_match
                    car.cur_detected = found_match
                    car.n_non_detections = 0 # Reset non_detections value
                    car.xpixels = nonzerox # Pixel x values of current detection
                    car.ypixels = nonzeroy # Pixel y values of current detection
                   
                    car.recent_xfitted.append(bbox[0][0])
                    car.bestx = int(np.mean(car.recent_xfitted)*.25 + bbox[0][0]*.75) # Average x position of the last n fits
                    car.recent_yfitted.append(bbox[0][1]) # Y position of the last n fits of the bounding box
                    car.besty = int(np.mean(car.recent_yfitted)*.25 + bbox[0][1]*.75) # Average y position of the current fit
                    car.recent_wfitted.append(bbox[1][0])
                    car.bestw = int(np.mean(car.recent_wfitted)*.25 + bbox[1][0]*.75) # Average width+xstart of the last n fits
                    car.recent_hfitted.append(bbox[1][1]) # Height of the last n fits of the bounding box
                    car.besth = int(np.mean(car.recent_hfitted)*.25 + bbox[1][1]*.75) # Average height+ystart of the last n fits

                    car.bounding_box = ((car.bestx, car.besty),
                                            (car.bestw, car.besth))
                    break

            # After searching for existing car, add new Vehicle         
            if found_match == False and len(nonzerox) > noisy_pix_thresh and len(nonzeroy) < 1e5: 
                # Add New Vehicle
                car = Vehicle(bbox)
                car.xpixels = nonzerox
                car.ypixels = nonzeroy
                car.n_non_detections +=1
                car.prev_detected = found_match
                car.cur_detected = True

                # Add car to carslist
                carslist.append(car)
            
        
    # After searching through labels and updating carslist, draw labels
    for car in carslist:
        ## Remove Stale cars ##
        car_lens = [car.car_number for car in carslist]
        if len(car_lens) > 0: 
            max_car_number = np.max(car_lens)
            min_car_number = np.min(car_lens)
        else: 
            max_car_number = 1
            min_car_number = 0
        if (car.n_non_detections >= remove_threshold \
            or len(car.xpixels) < noisy_pix_thresh
            or (np.abs(max_car_number - car.car_number) > keep_weight and \
                car.cur_detected == False and car.prev_detected == False) and 
                car.n_non_detections > 3):
            if debug: 
                print('Removing Car:', car.bounding_box)
                print('Carlist now has size:', len(carslist))
            carslist.remove(car)
            
        # Set n_non_detections+=1 for each car in carslist that wasn't prev_detected
        if (car.prev_detected == True and car.cur_detected == False):
            if debug:
                print('Found possible false positive for car:', car.bounding_box, 'checking against smoothing factor')
                print( 'Car number:', car.car_number)
            car.prev_detected == False
            car.n_non_detections +=1
        
        ## Apply noise filtering to object detections
        #Process cars within the smoothing factor range
        if (car.n_detections >= smoothing_factor//2 \
            and car.n_detections > car.n_non_detections #prev had this as an or
            and len(car.xpixels) > noisy_pix_thresh
            and len(car.ypixels) < 1e5):
            cv2.rectangle(img, car.bounding_box[0], car.bounding_box[1], BBOX_COLOR, BBOX_THICK)
            

            
    # Return the image
    return img
In [ ]:
# Calibration Constants #
IMAGE_EXTENSION = '.jpg'
CALIBRATION_DIRECTORY = 'camera_cal/'
CALIBRATION_PREFIX = 'corners_found'
calibration_path = "{}{}{}".format(DATACACHE_DIRECTORY, CALIBRATION_DIRECTORY, '*'+IMAGE_EXTENSION)
dist_pickle_file = os.path.join(DATACACHE_DIRECTORY, "calibration_pickle.p")
CHESSBOARD_SIZE = (9,6)

Camera Calibration

In [97]:
# Calibrate the camera using a 9x6 checkerboard
objp = np.zeros((CHESSBOARD_SIZE[1]*CHESSBOARD_SIZE[0], 3), np.float32)
objp[:,:2] = np.mgrid[0:CHESSBOARD_SIZE[0], 0:CHESSBOARD_SIZE[1]].T.reshape(-1, 2)

# Arrays to store object points and image points from all the images
objpoints = [] # 3-Dim points in real-world space
imgpoints = [] # 2-Dim points in virtual image plane

# Load Calibration Images 
calibration_images = glob.glob(calibration_path, recursive=True)

# Walk through images and search for checkerboard corners
for idx, fname in enumerate(calibration_images):
    img = mpimg.imread(fname)
    gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
    
    # Find the checkerboard corners
    ret, corners = cv2.findChessboardCorners(gray, CHESSBOARD_SIZE, None)
    
    # If found, add object points, image points
    if ret == True:
        print('Calibrating image:', fname)
        imgpoints.append(corners)
        objpoints.append(objp)
        
        # Draw and display found corners
        cv2.drawChessboardCorners(img, CHESSBOARD_SIZE, corners, ret)
        output_img_path = "{}{}{}{}{}".format(DATACACHE_DIRECTORY, CALIBRATION_DIRECTORY, CALIBRATION_PREFIX
                                              ,str(idx), IMAGE_EXTENSION)
        print('Saving Calibrated image:', output_img_path)

        os.makedirs(os.path.join(DATACACHE_DIRECTORY, CALIBRATION_DIRECTORY), exist_ok=True)    
        cv2.imwrite(output_img_path, img)
Calibrating image: data/datacache/camera_cal/calibration10.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found1.jpg
Calibrating image: data/datacache/camera_cal/calibration11.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found2.jpg
Calibrating image: data/datacache/camera_cal/calibration12.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found3.jpg
Calibrating image: data/datacache/camera_cal/calibration13.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found4.jpg
Calibrating image: data/datacache/camera_cal/calibration14.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found5.jpg
Calibrating image: data/datacache/camera_cal/calibration15.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found6.jpg
Calibrating image: data/datacache/camera_cal/calibration16.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found7.jpg
Calibrating image: data/datacache/camera_cal/calibration17.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found8.jpg
Calibrating image: data/datacache/camera_cal/calibration18.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found9.jpg
Calibrating image: data/datacache/camera_cal/calibration19.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found10.jpg
Calibrating image: data/datacache/camera_cal/calibration2.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found11.jpg
Calibrating image: data/datacache/camera_cal/calibration20.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found12.jpg
Calibrating image: data/datacache/camera_cal/calibration3.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found13.jpg
Calibrating image: data/datacache/camera_cal/calibration6.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found16.jpg
Calibrating image: data/datacache/camera_cal/calibration7.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found17.jpg
Calibrating image: data/datacache/camera_cal/calibration8.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found18.jpg
Calibrating image: data/datacache/camera_cal/calibration9.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found19.jpg
Calibrating image: data/datacache/camera_cal/corners_found13.jpg
Saving Calibrated image: data/datacache/camera_cal/corners_found24.jpg
In [98]:
# Load image for reference
if os.path.exists(dist_pickle_file):
    dist_pickle = pickle.load( open(dist_pickle_file, "rb"))
else:
    dist_pickle = {}

img = cv2.imread(calibration_images[1])
img_size = (img.shape[1], img.shape[0])

# Perform calibration given object points and image points
if ("mtx" in dist_pickle and "dist" in dist_pickle):
    mtx = dist_pickle["mtx"]
    dist = dist_pickle["dist"]
else:
    ret, mtx, dist, _, _ = cv2.calibrateCamera(objpoints, imgpoints, img_size, None, None)

# Save camera calibration result data
dist_pickle = {}
dist_pickle["mtx"] = mtx
dist_pickle["dist"] = dist

pickle.dump(dist_pickle, open(dist_pickle_file, "wb"))
In [99]:
# Read in the saved objpoints and imgpoints
dist_pickle = pickle.load( open(dist_pickle_file, "rb"))
mtx = dist_pickle["mtx"]
dist = dist_pickle["dist"]
In [122]:
def process_image(img):
    if (img is not None):
        labels = []
        carslist = []
        bboxes = []
        SMOOTHING_FACTOR = 30
                
        if (len(CARS_PREV_FRAMES) > SMOOTHING_FACTOR):
            flattened_carslist = np.ravel(lambda x,y:  x+y, CARS_PREV_FRAMES[:-SMOOTHING_FACTOR]) 
            CARS_PREV_FRAMES.remove(CARS_PREV_FRAMES[0])
        else:
            flattened_carslist = np.ravel(lambda x,y:  x+y, CARS_PREV_FRAMES)

        
        # Search for cars from previous frame Gather previous bboxes from carslist
        heatmap_1 = np.zeros_like(img[:,:,2])
        heatmap_2 = np.zeros_like(img[:,:,2])
        heatmap_3 = np.zeros_like(img[:,:,2])
        img = cv2.undistort(img, mtx, dist, None, mtx)
                
        ## Search for previously detected cars in current frame ##
        for car_ind in range(0, len(flattened_carslist)-1):
            if flattened_carslist[car_ind].n_non_detections == 0:
                bboxes.append(list(flattened_carslist[car_ind].bounding_box)) # Grab previous frames for feedback loop
            
        detected_cars_threshold = SMOOTHING_FACTOR # Divide by two to account for error
        _, heatmap_1 = search_windows(img, bboxes)
        labels.append(label(apply_threshold(heatmap_1, detected_cars_threshold)))
        
        ## Detect with HOG subsampling ##
        hog_subsampling_threshold = 3
        _, heatmap_2 = find_cars(img, ystart=SW_YSTART, ystop=SW_YSTOP, scale=SW_SCALES)
        labels.append(label(apply_threshold(heatmap_2, hog_subsampling_threshold)))
        
        ## Detect with Sliding Windows ##
        sliding_windows_threshold = 4
        windows = slide_windows(img, x_start_stops=SW_XSTART_STOPS, 
                              y_start_stops=SW_YSTART_STOPS, 
                              xy_windows=SW_XY_WINDOWS, 
                              xy_overlaps=SW_XY_OVERLAPS)
        _, heatmap_3 = search_windows(img, windows)
        labels.append(label(apply_threshold(heatmap_3, sliding_windows_threshold)))
        
        combined_threshold = 1
        combined_heatmap = cv2.add(heatmap_1, heatmap_2, heatmap_3)
        labels.append(label(apply_threshold(combined_heatmap, combined_threshold)))
        draw_img = draw_multi_frame_labeled_bboxes(img, labels, smoothing_factor=SMOOTHING_FACTOR, debug=False)
        CARS_PREV_FRAMES.append(carslist)
        return draw_img
    else:
        return img
In [123]:
#Import packages to edit/save/watch video clips
from moviepy.editor import VideoFileClip
from IPython.display import HTML

test_ouput = 'test_output.mp4'
VIDEO_OUTPUT_PATH = os.path.join(WORKING_DIRECTORY, test_ouput)

TEST_VIDEO = 'test_video.mp4'
VIDEO_FILE_PATH = os.path.join(WORKING_DIRECTORY, TEST_VIDEO)
clip = VideoFileClip(VIDEO_FILE_PATH)
CARS_PREV_FRAMES = []
test_clip = clip.fl_image(process_image)
#%time
test_clip.write_videofile(VIDEO_OUTPUT_PATH, audio=False)
clip = VideoFileClip(VIDEO_FILE_PATH)
CARS_PREV_FRAMES = None

HTML("""
<video width="960" height="540" controls>
 <source src="{0}">
</video>
""".format(VIDEO_OUTPUT_PATH))
[MoviePy] >>>> Building video data/test_output.mp4
[MoviePy] Writing video data/test_output.mp4
  0%|          | 0/39 [00:00<?, ?it/s]
 97%|█████████▋| 38/39 [05:02<00:07,  7.75s/it]
[MoviePy] Done.
[MoviePy] >>>> Video ready: data/test_output.mp4 

Out[123]:

Process Project Video

In [124]:
project_ouput = 'project_output_no_yolo.mp4'
PROJECT_VIDEO = 'project_video.mp4'
VIDEO_FILE_PATH = os.path.join(WORKING_DIRECTORY, PROJECT_VIDEO)
VIDEO_OUTPUT_PATH = os.path.join(WORKING_DIRECTORY, project_ouput)

CARS_PREV_FRAMES = []
clip = VideoFileClip(VIDEO_FILE_PATH)
project_clip = clip.fl_image(process_image)
project_clip.write_videofile(VIDEO_OUTPUT_PATH, audio=False)
CARS_PREV_FRAMES = None
[MoviePy] >>>> Building video data/project_output_no_yolo.mp4
[MoviePy] Writing video data/project_output_no_yolo.mp4
100%|█████████▉| 1260/1261 [2:57:09<00:08,  8.29s/it]
[MoviePy] Done.
[MoviePy] >>>> Video ready: data/project_output_no_yolo.mp4 

In [125]:
HTML("""
<video width="960" height="540" controls>
    <source src="{0}">
</video>
""".format(VIDEO_OUTPUT_PATH))
Out[125]:

Implement Vehicle Detections Using YOLO Feature Extractor:

At this point, I feel as if I have exhausted all options, as such I now will utilize the new and improved YOLO library to perform feature extraction.

This is ideal because my ultimate goal is to provide real-time detection and the sliding windows is at best 3-4 seconds per frame.

In [113]:
def process_yolo(frame, output_extension='.jpg'):
    global COUNTER
    # Increment Counter
    COUNTER += 1
        
    if frame is not None:
        frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
        ## process image using Yolo libraries ##
        ## Create directory for prediction input ##
        YOLO_INPUT_DIR = 'darkflow/test/process/'
        YOLO_CACHE_DIR =os.path.join(DATACACHE_DIRECTORY,YOLO_INPUT_DIR) # DATACACHE_DIRECTORY = data/datacache/
        
        ## YOLO's processed directory ##
        outfile = os.path.join(YOLO_INPUT_DIR, 'out/')
        os.makedirs(outfile, exist_ok=True)
        im = Image.fromarray(frame)
        im.save(YOLO_INPUT_DIR+'yolo_file_'+str(COUNTER)+output_extension)
        
        # Save to cache
        im_copy = Image.fromarray(frame)
        im_copy.save(YOLO_CACHE_DIR+'yolo_file_'+str(COUNTER)+output_extension)
        
        ## Predict ##
        !source activate sdc_dev && cd darkflow && ./flow --test test/process --model cfg/tiny-yolo.cfg
        #!source activate sdc_dev && cd darkflow && ./flow --test test/process --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights

        prediction = glob.glob(outfile+'*.jpg')
        if len(prediction) > 0:
            copy_img = cv2.imread(prediction[0])
        else:
            copy_img = frame
            
        shutil.rmtree(outfile)
        
        # Return prediction
        return copy_img
    else:
        return frame
In [116]:
from PIL import Image
import shutil
import os

project_ouput = 'project_output_yolo.mp4'
PROJECT_VIDEO = 'project_video.mp4'
output_dir = 'output_images/'
COUNTER = 0
VIDEO_FILE_PATH = os.path.join(WORKING_DIRECTORY, PROJECT_VIDEO)
VIDEO_OUTPUT_PATH = os.path.join(WORKING_DIRECTORY, output_dir, project_ouput)
os.makedirs(os.path.join(WORKING_DIRECTORY, output_dir), exist_ok=True)

# Make Datacach e Directory
os.makedirs(os.path.join(DATACACHE_DIRECTORY,'darkflow/test/process/'), exist_ok=True)

clip = VideoFileClip(VIDEO_FILE_PATH)

# Process a test bed
project_clip = clip.fl_image(process_yolo).subclip(26,35)
project_clip.write_videofile(VIDEO_OUTPUT_PATH, audio=False)

HTML("""
<video width="960" height="540" controls>
    <source src="{0}">
</video>
""".format(VIDEO_OUTPUT_PATH))
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00013899803161621094s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 5.120481967926025s

Forwarding 2 inputs ...
Total time = 2.247351884841919s / 2 inps = 0.8899362905692368 ips
Post processing 2 inputs ...
Total time = 1.4151837825775146s / 2 inps = 1.4132440073312194 ips
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00026702880859375s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 6.815492153167725s

Forwarding 3 inputs ...
Total time = 2.838956832885742s / 3 inps = 1.0567261767592855 ips
Post processing 3 inputs ...
Total time = 1.2143771648406982s / 3 inps = 2.4704021838170345 ips
[MoviePy] >>>> Building video data/output_images/project_output_yolo.mp4
[MoviePy] Writing video data/output_images/project_output_yolo.mp4
  0%|          | 0/226 [00:00<?, ?it/s]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00018215179443359375s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.353063106536865s

Forwarding 4 inputs ...
Total time = 3.6087069511413574s / 4 inps = 1.1084302644011825 ips
Post processing 4 inputs ...
Total time = 1.5669760704040527s / 4 inps = 2.552687354675799 ips
  0%|          | 1/226 [00:18<1:07:43, 18.06s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00014019012451171875s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 5.311752080917358s

Forwarding 5 inputs ...
Total time = 4.802748918533325s / 5 inps = 1.0410704546110048 ips
Post processing 5 inputs ...
Total time = 3.518159866333008s / 5 inps = 1.4211974981146949 ips
  1%|          | 2/226 [00:40<1:12:16, 19.36s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001990795135498047s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.762325048446655s

Forwarding 6 inputs ...
Total time = 5.8097169399261475s / 6 inps = 1.0327525526701946 ips
Post processing 6 inputs ...
Total time = 5.2674150466918945s / 6 inps = 1.1390786461317857 ips
  1%|▏         | 3/226 [01:06<1:19:02, 21.27s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0004780292510986328s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 10.688210010528564s

Forwarding 7 inputs ...
Total time = 12.456586122512817s / 7 inps = 0.5619517202509349 ips
Post processing 7 inputs ...
Total time = 5.876101970672607s / 7 inps = 1.1912659165781538 ips
  2%|▏         | 4/226 [01:50<1:44:30, 28.25s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00012302398681640625s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 6.047691106796265s

Forwarding 8 inputs ...
Total time = 8.192588090896606s / 8 inps = 0.976492399134456 ips
Post processing 8 inputs ...
Total time = 6.028291940689087s / 8 inps = 1.3270757419697112 ips
  2%|▏         | 5/226 [02:20<1:45:28, 28.63s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001609325408935547s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 5.270296096801758s

Forwarding 9 inputs ...
Total time = 8.090167045593262s / 9 inps = 1.1124615782689342 ips
Post processing 9 inputs ...
Total time = 9.652915000915527s / 9 inps = 0.9323608463501852 ips
  3%|▎         | 6/226 [02:51<1:47:48, 29.40s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001430511474609375s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 5.787414073944092s

Forwarding 10 inputs ...
Total time = 10.773787021636963s / 10 inps = 0.9281787341736969 ips
Post processing 10 inputs ...
Total time = 5.894038915634155s / 10 inps = 1.6966294493703853 ips
  3%|▎         | 7/226 [03:23<1:49:49, 30.09s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0002288818359375s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.312355995178223s

Forwarding 11 inputs ...
Total time = 9.160034894943237s / 11 inps = 1.2008687877458315 ips
Post processing 11 inputs ...
Total time = 4.938995122909546s / 11 inps = 2.2271736914613385 ips
  4%|▎         | 8/226 [03:50<1:46:04, 29.20s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00015401840209960938s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.378116130828857s

Forwarding 12 inputs ...
Total time = 9.945358991622925s / 12 inps = 1.206592945524412 ips
Post processing 12 inputs ...
Total time = 5.098135948181152s / 12 inps = 2.353801491755277 ips
  4%|▍         | 9/226 [04:17<1:43:33, 28.63s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00013494491577148438s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.011887073516846s

Forwarding 13 inputs ...
Total time = 9.32075309753418s / 13 inps = 1.394737084435717 ips
Post processing 13 inputs ...
Total time = 5.729184150695801s / 13 inps = 2.2690839843961323 ips
  4%|▍         | 10/226 [04:45<1:41:54, 28.31s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00014400482177734375s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.016625881195068s

Forwarding 14 inputs ...
Total time = 10.799017190933228s / 14 inps = 1.2964142710833253 ips
Post processing 14 inputs ...
Total time = 5.993000030517578s / 14 inps = 2.336058723295369 ips
  5%|▍         | 11/226 [05:13<1:41:53, 28.44s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00015497207641601562s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.855329990386963s

Forwarding 15 inputs ...
Total time = 11.190839052200317s / 15 inps = 1.3403820687646055 ips
Post processing 15 inputs ...
Total time = 6.626810073852539s / 15 inps = 2.263532504000021 ips
  5%|▌         | 12/226 [05:43<1:42:48, 28.83s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00014710426330566406s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.262861013412476s

Forwarding 16 inputs ...
Total time = 11.486624956130981s / 16 inps = 1.3929243847610786 ips
Post processing 16 inputs ...
Total time = 6.686931848526001s / 16 inps = 2.3927266439132135 ips
  6%|▌         | 13/226 [06:13<1:43:36, 29.19s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00011777877807617188s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.9861550331115723s

Forwarding 17 inputs ...
Total time = 13.020057916641235s / 17 inps = 1.3056777557242591 ips
Post processing 17 inputs ...
Total time = 7.50654411315918s / 17 inps = 2.2646906144464705 ips
  6%|▌         | 14/226 [06:46<1:47:13, 30.35s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00016117095947265625s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 5.296380043029785s

Forwarding 18 inputs ...
Total time = 15.01653003692627s / 18 inps = 1.1986790527330384 ips
Post processing 18 inputs ...
Total time = 6.285009145736694s / 18 inps = 2.8639576463003125 ips
  7%|▋         | 15/226 [07:21<1:51:13, 31.63s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.894371032714844e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.1008830070495605s

Forwarding 19 inputs ...
Total time = 14.7273108959198s / 19 inps = 1.2901201131880735 ips
Post processing 19 inputs ...
Total time = 7.11457085609436s / 19 inps = 2.6705756937854583 ips
  7%|▋         | 16/226 [07:53<1:51:41, 31.91s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001659393310546875s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.0252928733825684s

Forwarding 20 inputs ...
Total time = 15.239037036895752s / 20 inps = 1.312418885233845 ips
Post processing 20 inputs ...
Total time = 7.823166847229004s / 20 inps = 2.556509453340379 ips
  8%|▊         | 17/226 [08:27<1:52:53, 32.41s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00012993812561035156s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.5709400177001953s

Forwarding 21 inputs ...
Total time = 16.96092200279236s / 21 inps = 1.2381402376912451 ips
Post processing 21 inputs ...
Total time = 8.866706132888794s / 21 inps = 2.3684105106524096 ips
  8%|▊         | 18/226 [09:04<1:56:47, 33.69s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00011110305786132812s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.12062406539917s

Forwarding 22 inputs ...
Total time = 15.630443096160889s / 22 inps = 1.4075096825248408 ips
Post processing 22 inputs ...
Total time = 8.74916696548462s / 22 inps = 2.5145251069947334 ips
  8%|▊         | 19/226 [09:39<1:57:50, 34.15s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00015282630920410156s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.9715940952301025s

Forwarding 23 inputs ...
Total time = 19.238727807998657s / 23 inps = 1.1955052449173673 ips
Post processing 23 inputs ...
Total time = 9.898696184158325s / 23 inps = 2.323538329907401 ips
  9%|▉         | 20/226 [10:20<2:04:15, 36.19s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.799003601074219e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.954171895980835s

Forwarding 24 inputs ...
Total time = 17.672218084335327s / 24 inps = 1.3580638200291126 ips
Post processing 24 inputs ...
Total time = 9.109700918197632s / 24 inps = 2.6345541105589265 ips
  9%|▉         | 21/226 [10:58<2:05:19, 36.68s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.894371032714844e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.415558099746704s

Forwarding 25 inputs ...
Total time = 16.508277893066406s / 25 inps = 1.514391759209492 ips
Post processing 25 inputs ...
Total time = 8.721618175506592s / 25 inps = 2.8664405500127144 ips
 10%|▉         | 22/226 [11:33<2:03:20, 36.28s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00014400482177734375s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.7956528663635254s

Forwarding 26 inputs ...
Total time = 18.780192136764526s / 26 inps = 1.384437380121464 ips
Post processing 26 inputs ...
Total time = 10.575493097305298s / 26 inps = 2.4585142045646045 ips
 10%|█         | 23/226 [12:14<2:07:17, 37.62s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00010704994201660156s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.309118986129761s

Forwarding 27 inputs ...
Total time = 21.16028094291687s / 27 inps = 1.2759754973403554 ips
Post processing 27 inputs ...
Total time = 11.703805923461914s / 27 inps = 2.3069418765629672 ips
 11%|█         | 24/226 [12:59<2:14:05, 39.83s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00015592575073242188s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.3769779205322266s

Forwarding 28 inputs ...
Total time = 21.618558883666992s / 28 inps = 1.2951834648494651 ips
Post processing 28 inputs ...
Total time = 11.787198066711426s / 28 inps = 2.3754585136798223 ips
 11%|█         | 25/226 [13:43<2:17:27, 41.03s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00011587142944335938s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.1391568183898926s

Forwarding 29 inputs ...
Total time = 21.902415990829468s / 29 inps = 1.3240548445496738 ips
Post processing 29 inputs ...
Total time = 11.424922943115234s / 29 inps = 2.5383103364802713 ips
 12%|█▏        | 26/226 [14:27<2:19:54, 41.97s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00011086463928222656s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.0522358417510986s

Forwarding 30 inputs ...
Total time = 20.734463930130005s / 30 inps = 1.446866439426288 ips
Post processing 30 inputs ...
Total time = 10.328176021575928s / 30 inps = 2.90467551456607 ips
 12%|█▏        | 27/226 [15:08<2:18:18, 41.70s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00010395050048828125s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.125075101852417s

Forwarding 31 inputs ...
Total time = 20.892531871795654s / 31 inps = 1.4837837840922072 ips
Post processing 31 inputs ...
Total time = 11.621831893920898s / 31 inps = 2.6673935987850035 ips
 12%|█▏        | 28/226 [15:50<2:18:16, 41.90s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.608268737792969e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.3771469593048096s

Forwarding 32 inputs ...
Total time = 21.352235078811646s / 32 inps = 1.498672147524003 ips
Post processing 32 inputs ...
Total time = 12.4393789768219s / 32 inps = 2.5724756886678266 ips
 13%|█▎        | 29/226 [16:34<2:19:57, 42.63s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00015091896057128906s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.4619810581207275s

Forwarding 33 inputs ...
Total time = 21.660964012145996s / 33 inps = 1.523477901606588 ips
Post processing 33 inputs ...
Total time = 12.033370018005371s / 33 inps = 2.742373911100759 ips
 13%|█▎        | 30/226 [17:18<2:20:32, 43.02s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001239776611328125s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 2.9606809616088867s

Forwarding 34 inputs ...
Total time = 25.038002014160156s / 34 inps = 1.3579358281372218 ips
Post processing 34 inputs ...
Total time = 13.716961145401001s / 34 inps = 2.478683116442264 ips
 14%|█▎        | 31/226 [18:07<2:25:11, 44.67s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001220703125s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.095654010772705s

Forwarding 35 inputs ...
Total time = 29.664713144302368s / 35 inps = 1.1798529731180754 ips
Post processing 35 inputs ...
Total time = 16.955990076065063s / 35 inps = 2.0641672850119033 ips
 14%|█▍        | 32/226 [19:06<2:38:26, 49.00s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001220703125s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.393979072570801s

Forwarding 36 inputs ...
Total time = 30.42071008682251s / 36 inps = 1.1834043287370304 ips
Post processing 36 inputs ...
Total time = 19.87027382850647s / 36 inps = 1.8117515798072876 ips
 15%|█▍        | 33/226 [20:10<2:51:46, 53.40s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.608268737792969e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.8331539630889893s

Forwarding 37 inputs ...
Total time = 31.14169216156006s / 37 inps = 1.1881178391992193 ips
Post processing 37 inputs ...
Total time = 14.032057046890259s / 37 inps = 2.6368193826720385 ips
 15%|█▌        | 34/226 [21:07<2:54:39, 54.58s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.107589721679688e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 2.989544153213501s

Forwarding 38 inputs ...
Total time = 27.711088180541992s / 38 inps = 1.3712922333624782 ips
Post processing 38 inputs ...
Total time = 14.206368923187256s / 38 inps = 2.6748566227910224 ips
 15%|█▌        | 35/226 [22:00<2:51:58, 54.02s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00011277198791503906s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.1109440326690674s

Forwarding 39 inputs ...
Total time = 26.023221969604492s / 39 inps = 1.498661466499136 ips
Post processing 39 inputs ...
Total time = 13.11280608177185s / 39 inps = 2.974191775337394 ips
 16%|█▌        | 36/226 [22:49<2:46:59, 52.73s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00013494491577148438s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.032625913619995s

Forwarding 40 inputs ...
Total time = 26.10432720184326s / 40 inps = 1.5323130027720289 ips
Post processing 40 inputs ...
Total time = 16.179265022277832s / 40 inps = 2.472300190702267 ips
 16%|█▋        | 37/226 [23:42<2:46:14, 52.78s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.608268737792969e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.622537851333618s

Forwarding 41 inputs ...
Total time = 29.57697105407715s / 41 inps = 1.3862136161623013 ips
Post processing 41 inputs ...
Total time = 16.11360502243042s / 41 inps = 2.544433721872125 ips
 17%|█▋        | 38/226 [24:39<2:49:04, 53.96s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001418590545654297s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.432857036590576s

Forwarding 42 inputs ...
Total time = 29.13243794441223s / 42 inps = 1.4416919064631815 ips
Post processing 42 inputs ...
Total time = 17.257251977920532s / 42 inps = 2.4337594452312636 ips
 17%|█▋        | 39/226 [25:36<2:51:15, 54.95s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001468658447265625s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.329438924789429s

Forwarding 43 inputs ...
Total time = 45.853474855422974s / 43 inps = 0.9377697139765298 ips
Post processing 43 inputs ...
Total time = 23.79799199104309s / 43 inps = 1.806875135355286 ips
 18%|█▊        | 40/226 [27:00<3:16:40, 63.44s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00011205673217773438s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.398754835128784s

Forwarding 44 inputs ...
Total time = 39.68305802345276s / 44 inps = 1.1087855168317906 ips
Post processing 44 inputs ...
Total time = 16.88877296447754s / 44 inps = 2.605281040401573 ips
 18%|█▊        | 41/226 [28:10<3:21:37, 65.39s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.202957153320312e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.314351797103882s

Forwarding 45 inputs ...
Total time = 32.81071901321411s / 45 inps = 1.3715030134474289 ips
Post processing 45 inputs ...
Total time = 16.702986001968384s / 45 inps = 2.694129061396383 ips
 19%|█▊        | 42/226 [29:10<3:16:25, 64.05s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.202957153320312e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.1058921813964844s

Forwarding 46 inputs ...
Total time = 30.582727909088135s / 46 inps = 1.5041169687917337 ips
Post processing 46 inputs ...
Total time = 15.011621952056885s / 46 inps = 3.0642924626607124 ips
 19%|█▉        | 43/226 [30:07<3:08:40, 61.86s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0002319812774658203s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.6382761001586914s

Forwarding 47 inputs ...
Total time = 32.7783579826355s / 47 inps = 1.4338729238633152 ips
Post processing 47 inputs ...
Total time = 18.55049705505371s / 47 inps = 2.5336248328287136 ips
 19%|█▉        | 44/226 [31:09<3:08:00, 61.98s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.000141143798828125s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.7035560607910156s

Forwarding 48 inputs ...
Total time = 35.31597685813904s / 48 inps = 1.3591582130889792 ips
Post processing 48 inputs ...
Total time = 17.602044105529785s / 48 inps = 2.726956012166821 ips
 20%|█▉        | 45/226 [32:13<3:08:44, 62.57s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.298324584960938e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.152195930480957s

Forwarding 48 inputs ...
Total time = 41.04589319229126s / 48 inps = 1.1694227184953738 ips
Post processing 48 inputs ...
Total time = 29.699126958847046s / 48 inps = 1.6162091251541428 ips
 20%|██        | 46/226 [33:37<3:26:49, 68.94s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 8.893013000488281e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.887380838394165s

Forwarding 48 inputs ...
Total time = 40.32225203514099s / 48 inps = 1.1904097012777912 ips
Post processing 48 inputs ...
Total time = 25.147127151489258s / 48 inps = 1.9087667434471676 ips
 21%|██        | 47/226 [34:56<3:34:55, 72.04s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00017309188842773438s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.394430875778198s

Forwarding 48 inputs ...
Total time = 38.18589806556702s / 48 inps = 1.257008540628839 ips
Post processing 48 inputs ...
Total time = 16.51737880706787s / 48 inps = 2.9060301008208733 ips
 21%|██        | 48/226 [36:07<3:32:28, 71.62s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00018286705017089844s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 2.8499958515167236s

Forwarding 48 inputs ...
Total time = 31.02752709388733s / 48 inps = 1.5470133940985706 ips
Post processing 48 inputs ...
Total time = 16.1755850315094s / 48 inps = 2.9674351750800914 ips
 22%|██▏       | 49/226 [37:05<3:18:43, 67.36s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001289844512939453s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.161008834838867s

Forwarding 48 inputs ...
Total time = 29.983968019485474s / 48 inps = 1.600855496137355 ips
Post processing 48 inputs ...
Total time = 17.087289094924927s / 48 inps = 2.80910563011756 ips
 22%|██▏       | 50/226 [38:03<3:09:22, 64.56s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001361370086669922s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.062775135040283s

Forwarding 48 inputs ...
Total time = 32.17260479927063s / 48 inps = 1.4919525571360694 ips
Post processing 48 inputs ...
Total time = 16.985761880874634s / 48 inps = 2.8258962027512173 ips
 23%|██▎       | 51/226 [39:01<3:03:05, 62.77s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00010609626770019531s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.995288133621216s

Forwarding 48 inputs ...
Total time = 41.50984787940979s / 48 inps = 1.156352105636348 ips
Post processing 48 inputs ...
Total time = 23.188620805740356s / 48 inps = 2.0699808066255314 ips
 23%|██▎       | 52/226 [40:19<3:15:17, 67.34s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.989738464355469e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.116111993789673s

Forwarding 48 inputs ...
Total time = 43.35712695121765s / 48 inps = 1.1070844259124037 ips
Post processing 48 inputs ...
Total time = 27.580799102783203s / 48 inps = 1.740341163471086 ips
 23%|██▎       | 53/226 [41:44<3:29:35, 72.69s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00015497207641601562s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.279352903366089s

Forwarding 48 inputs ...
Total time = 34.694864988327026s / 48 inps = 1.3834900356623219 ips
Post processing 48 inputs ...
Total time = 22.66953682899475s / 48 inps = 2.1173789461197603 ips
 24%|██▍       | 54/226 [42:57<3:28:26, 72.71s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00011086463928222656s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.8937389850616455s

Forwarding 48 inputs ...
Total time = 39.792556047439575s / 48 inps = 1.2062557615744949 ips
Post processing 48 inputs ...
Total time = 19.98790693283081s / 48 inps = 2.4014520460448203 ips
 24%|██▍       | 55/226 [44:10<3:27:01, 72.64s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00017189979553222656s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.113444089889526s

Forwarding 48 inputs ...
Total time = 42.91000699996948s / 48 inps = 1.118620185730432 ips
Post processing 48 inputs ...
Total time = 22.08598494529724s / 48 inps = 2.173323948145705 ips
 25%|██▍       | 56/226 [45:28<3:30:19, 74.23s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00010991096496582031s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.8927791118621826s

Forwarding 48 inputs ...
Total time = 37.96099591255188s / 48 inps = 1.2644557616605814 ips
Post processing 48 inputs ...
Total time = 24.098082065582275s / 48 inps = 1.991859761676025 ips
 25%|██▌       | 57/226 [46:43<3:29:58, 74.55s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00016498565673828125s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.91438889503479s

Forwarding 48 inputs ...
Total time = 38.55230712890625s / 48 inps = 1.245061672690658 ips
Post processing 48 inputs ...
Total time = 22.91040587425232s / 48 inps = 2.0951178369975727 ips
 26%|██▌       | 58/226 [47:58<3:29:29, 74.82s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 8.893013000488281e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.808934211730957s

Forwarding 48 inputs ...
Total time = 40.82561683654785s / 48 inps = 1.175732388617078 ips
Post processing 48 inputs ...
Total time = 23.39375591278076s / 48 inps = 2.0518295642204274 ips
 26%|██▌       | 59/226 [49:16<3:30:19, 75.56s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001480579376220703s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.806423902511597s

Forwarding 48 inputs ...
Total time = 41.626965045928955s / 48 inps = 1.1530987173107474 ips
Post processing 48 inputs ...
Total time = 25.730158805847168s / 48 inps = 1.865515108639439 ips
 27%|██▋       | 60/226 [50:38<3:35:08, 77.76s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001289844512939453s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.530689001083374s

Forwarding 48 inputs ...
Total time = 39.41529893875122s / 48 inps = 1.2178012419641633 ips
Post processing 48 inputs ...
Total time = 18.56544780731201s / 48 inps = 2.585448005250656 ips
 27%|██▋       | 61/226 [51:51<3:29:17, 76.11s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00010704994201660156s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.9660120010375977s

Forwarding 48 inputs ...
Total time = 39.837913036346436s / 48 inps = 1.2048823932169042 ips
Post processing 48 inputs ...
Total time = 21.291693925857544s / 48 inps = 2.254400244862939 ips
 27%|██▋       | 62/226 [53:06<3:27:03, 75.75s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 9.012222290039062e-05s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.772994041442871s

Forwarding 48 inputs ...
Total time = 39.12753105163574s / 48 inps = 1.2267577000106513 ips
Post processing 48 inputs ...
Total time = 27.627800941467285s / 48 inps = 1.737380405400111 ips
 28%|██▊       | 63/226 [54:26<3:29:27, 77.10s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0003039836883544922s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.512316942214966s

Forwarding 48 inputs ...
Total time = 44.60839009284973s / 48 inps = 1.0760307623765581 ips
Post processing 48 inputs ...
Total time = 25.069894790649414s / 48 inps = 1.9146470458225884 ips
 28%|██▊       | 64/226 [55:51<3:34:24, 79.41s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0001819133758544922s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.662860155105591s

Forwarding 48 inputs ...
Total time = 44.55738401412964s / 48 inps = 1.0772625247653378 ips
Post processing 48 inputs ...
Total time = 38.380433082580566s / 48 inps = 1.2506372686499307 ips
 29%|██▉       | 65/226 [57:30<3:49:28, 85.52s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.000148773193359375s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 6.229269027709961s

Forwarding 48 inputs ...
Total time = 47.194637060165405s / 48 inps = 1.0170647130691541 ips
Post processing 48 inputs ...
Total time = 31.92641592025757s / 48 inps = 1.5034572035861882 ips
 29%|██▉       | 66/226 [59:16<4:04:02, 91.51s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00011706352233886719s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.8809449672698975s

Forwarding 48 inputs ...
Total time = 67.90671491622925s / 48 inps = 0.706852040467773 ips
Post processing 48 inputs ...
Total time = 21.73711109161377s / 48 inps = 2.2082051197004975 ips
 30%|██▉       | 67/226 [1:01:01<4:12:59, 95.47s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00018596649169921875s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.89654803276062s

Forwarding 48 inputs ...
Total time = 35.418561935424805s / 48 inps = 1.3552215950357809 ips
Post processing 48 inputs ...
Total time = 19.156580924987793s / 48 inps = 2.505666339309481 ips
 30%|███       | 68/226 [1:02:09<3:49:44, 87.24s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.00014710426330566406s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 3.9908320903778076s

Forwarding 48 inputs ...
^C
 31%|███       | 69/226 [1:02:53<3:14:18, 74.26s/it]
Parsing cfg/tiny-yolo.cfg
Loading None ...
Finished in 0.0002319812774658203s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Finished in 4.781213045120239s

Forwarding 48 inputs ...
Total time = 61.097541093826294s / 48 inps = 0.7856289981668385 ips
Post processing 48 inputs ...
Total time = 27.894946813583374s / 48 inps = 1.7207417644770888 ips
---------------------------------------------------------------------------
BrokenPipeError                           Traceback (most recent call last)
/Users/deanmwebb/anaconda/envs/sdc_dev/lib/python3.5/site-packages/moviepy/video/io/ffmpeg_writer.py in write_frame(self, img_array)
    141             if PY3:
--> 142                self.proc.stdin.write(img_array.tobytes())
    143             else:

BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

OSError                                   Traceback (most recent call last)
<ipython-input-116-2af99d295c6c> in <module>()
     16 clip = VideoFileClip(VIDEO_FILE_PATH)
     17 project_clip = clip.fl_image(process_yolo).subclip(26,35)
---> 18 project_clip.write_videofile(VIDEO_OUTPUT_PATH, audio=False)
     19 
     20 HTML("""

<decorator-gen-172> in write_videofile(self, filename, fps, codec, bitrate, audio, audio_fps, preset, audio_nbytes, audio_codec, audio_bitrate, audio_bufsize, temp_audiofile, rewrite_audio, remove_temp, write_logfile, verbose, threads, ffmpeg_params)

/Users/deanmwebb/anaconda/envs/sdc_dev/lib/python3.5/site-packages/moviepy/decorators.py in requires_duration(f, clip, *a, **k)
     52         raise ValueError("Attribute 'duration' not set")
     53     else:
---> 54         return f(clip, *a, **k)
     55 
     56 

<decorator-gen-171> in write_videofile(self, filename, fps, codec, bitrate, audio, audio_fps, preset, audio_nbytes, audio_codec, audio_bitrate, audio_bufsize, temp_audiofile, rewrite_audio, remove_temp, write_logfile, verbose, threads, ffmpeg_params)

/Users/deanmwebb/anaconda/envs/sdc_dev/lib/python3.5/site-packages/moviepy/decorators.py in use_clip_fps_by_default(f, clip, *a, **k)
    135              for (k,v) in k.items()}
    136 
--> 137     return f(clip, *new_a, **new_kw)

<decorator-gen-170> in write_videofile(self, filename, fps, codec, bitrate, audio, audio_fps, preset, audio_nbytes, audio_codec, audio_bitrate, audio_bufsize, temp_audiofile, rewrite_audio, remove_temp, write_logfile, verbose, threads, ffmpeg_params)

/Users/deanmwebb/anaconda/envs/sdc_dev/lib/python3.5/site-packages/moviepy/decorators.py in convert_masks_to_RGB(f, clip, *a, **k)
     20     if clip.ismask:
     21         clip = clip.to_RGB()
---> 22     return f(clip, *a, **k)
     23 
     24 @decorator.decorator

/Users/deanmwebb/anaconda/envs/sdc_dev/lib/python3.5/site-packages/moviepy/video/VideoClip.py in write_videofile(self, filename, fps, codec, bitrate, audio, audio_fps, preset, audio_nbytes, audio_codec, audio_bitrate, audio_bufsize, temp_audiofile, rewrite_audio, remove_temp, write_logfile, verbose, threads, ffmpeg_params)
    336                            audiofile = audiofile,
    337                            verbose=verbose, threads=threads,
--> 338                            ffmpeg_params=ffmpeg_params)
    339 
    340         if remove_temp and make_audio:

/Users/deanmwebb/anaconda/envs/sdc_dev/lib/python3.5/site-packages/moviepy/video/io/ffmpeg_writer.py in ffmpeg_write_video(clip, filename, fps, codec, bitrate, preset, withmask, write_logfile, audiofile, verbose, threads, ffmpeg_params)
    221             frame = np.dstack([frame,mask])
    222 
--> 223         writer.write_frame(frame)
    224 
    225     writer.close()

/Users/deanmwebb/anaconda/envs/sdc_dev/lib/python3.5/site-packages/moviepy/video/io/ffmpeg_writer.py in write_frame(self, img_array)
    184 
    185 
--> 186             raise IOError(error)
    187 
    188     def close(self):

OSError: [Errno 32] Broken pipe

MoviePy error: FFMPEG encountered the following error while writing file data/output_images/project_output_yolo.mp4:

 b''
In [ ]:
from PIL import Image
import shutil
import os

test_ouput = 'test_output_yolo.mp4'
VIDEO_OUTPUT_PATH = os.path.join(WORKING_DIRECTORY, test_ouput)

TEST_VIDEO = 'test_video.mp4'
VIDEO_FILE_PATH = os.path.join(WORKING_DIRECTORY, TEST_VIDEO)

output_dir = 'output_images/'
VIDEO_OUTPUT_PATH = os.path.join(WORKING_DIRECTORY, output_dir, test_ouput)
os.makedirs(os.path.join(WORKING_DIRECTORY, output_dir), exist_ok=True)

clip = VideoFileClip(VIDEO_FILE_PATH)
project_clip = clip.fl_image(process_yolo)
project_clip.write_videofile(VIDEO_OUTPUT_PATH, audio=False)

HTML("""
<video width="960" height="540" controls>
    <source src="{0}">
</video>
""".format(VIDEO_OUTPUT_PATH))
In [ ]: